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.5/auctions/0a3e5825752c49199ced43de14247e09/documents?acc_token=2ae288c6a1204108bc3013241ac553eb HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 413
    Content-Type: application/json
    Host: lb.api-sandbox.registry.ea.openprocurement.net
    DATA:
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cec2473dcf334f84a6eda4dd4f223b54?KeyID=172d32c8&Signature=DzMn92M8VTpMmHmbZWkMWaZvMrtXA85WcUnK%2B8VVkdR4DBGETSC%2FOcMnWYpHaUyzZe5UVqRDHc11shf3TQ%2FFDg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    Response: 201 Created
    Content-Type: application/json
    Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/auctions/0a3e5825752c49199ced43de14247e09/documents/83124e21000e4fcbb2459ebdeed9d813
    X-Content-Type-Options: nosniff
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cec2473dcf334f84a6eda4dd4f223b54?KeyID=172d32c8&Signature=vXiuThpgZnfDuei34UPauCckBdIIvbgf1PQwN3%2Fhtku0QtnmYZE%252BEDhG0dF5qWNTjbOL06QJBJxbimPxh2XSDg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2018-12-07T19:32:46.577230+02:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2018-12-07T19:32:46.577251+02:00",
        "id": "83124e21000e4fcbb2459ebdeed9d813"
      }
    }
    
  3. Upload document in document service.

Upload document without registration

  1. Upload document without registration.

  2. Add document in API:

    POST /api/2.5/auctions/0a3e5825752c49199ced43de14247e09/documents?acc_token=2ae288c6a1204108bc3013241ac553eb HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 413
    Content-Type: application/json
    Host: lb.api-sandbox.registry.ea.openprocurement.net
    DATA:
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cec2473dcf334f84a6eda4dd4f223b54?KeyID=172d32c8&Signature=DzMn92M8VTpMmHmbZWkMWaZvMrtXA85WcUnK%2B8VVkdR4DBGETSC%2FOcMnWYpHaUyzZe5UVqRDHc11shf3TQ%2FFDg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    Response: 201 Created
    Content-Type: application/json
    Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/auctions/0a3e5825752c49199ced43de14247e09/documents/83124e21000e4fcbb2459ebdeed9d813
    X-Content-Type-Options: nosniff
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cec2473dcf334f84a6eda4dd4f223b54?KeyID=172d32c8&Signature=vXiuThpgZnfDuei34UPauCckBdIIvbgf1PQwN3%2Fhtku0QtnmYZE%252BEDhG0dF5qWNTjbOL06QJBJxbimPxh2XSDg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2018-12-07T19:32:46.577230+02:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2018-12-07T19:32:46.577251+02:00",
        "id": "83124e21000e4fcbb2459ebdeed9d813"
      }
    }