Documents Uploading

All of the document uploading API endpoints follow the same set of rules.

Upload document with registration

  1. Register document upload in document service.

  2. Add document in API:

    POST /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents?acc_token=ccf4d45ff9524ec9ae87f38c43d7b0a3 HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 415
    Content-Type: application/json
    Host: api-sandbox.ea.openprocurement.org
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=P1G3pRNxZchhK%2FgkOzQoI4eQtwB%2BhjrtHZpWFS4DHIsNZke%2BhlU%2Fckb5vkmRwzqcg96vsSluTsCXIfg4TWd6Bg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    
    201 Created
    Content-Type: application/json; charset=UTF-8
    Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents/418d8f99150a4b92a57b81cc18cd968a
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=u52VVOil6Bd6RED8Jt8wIJv2ioBCOV5meDxqcLgCksUxsJeTTj2aL5xHGYGjnsDBb0N6NohsEHBoxR5WaFE8Cw%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-11-30T16:56:26.092186+02:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-11-30T16:56:26.092222+02:00",
        "id": "418d8f99150a4b92a57b81cc18cd968a"
      }
    }
    
  3. Upload document in document service.

Upload document without registration

  1. Upload document without registration.

  2. Add document in API:

    POST /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents?acc_token=ccf4d45ff9524ec9ae87f38c43d7b0a3 HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 415
    Content-Type: application/json
    Host: api-sandbox.ea.openprocurement.org
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=P1G3pRNxZchhK%2FgkOzQoI4eQtwB%2BhjrtHZpWFS4DHIsNZke%2BhlU%2Fckb5vkmRwzqcg96vsSluTsCXIfg4TWd6Bg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    
    201 Created
    Content-Type: application/json; charset=UTF-8
    Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents/418d8f99150a4b92a57b81cc18cd968a
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=u52VVOil6Bd6RED8Jt8wIJv2ioBCOV5meDxqcLgCksUxsJeTTj2aL5xHGYGjnsDBb0N6NohsEHBoxR5WaFE8Cw%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-11-30T16:56:26.092186+02:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-11-30T16:56:26.092222+02:00",
        "id": "418d8f99150a4b92a57b81cc18cd968a"
      }
    }