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/a3fe480fc194429db59b3517ac2becff/documents?acc_token=149ad798bd474ec4af76cd8e6756b307 HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 409
    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/c683de25eb294b5fa8cc8294ec9fe908?KeyID=8f2f71ed&Signature=EI3h6z2srrKfB3oKk6GCDmuT%2BIsNpz1VxprMTQalWzXlnkQeKgbp0A9RRUEoW1dRBfUduSUxAa5AUQQNvqgsAQ%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/a3fe480fc194429db59b3517ac2becff/documents/2a0f652e19154a218c608f42a5c448e0
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/c683de25eb294b5fa8cc8294ec9fe908?KeyID=8f2f71ed&Signature=b1At6NDAC3JTU6fDd9uTHG1sI%2FzioJcoVHbxqTzZAELtHr3FwOjQ9yMpVBRf%2FFrizC84qhF2xqlfr51ifFqoBg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-03-29T15:47:34.401607+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-03-29T15:47:34.401638+03:00",
        "id": "2a0f652e19154a218c608f42a5c448e0"
      }
    }
    
  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/a3fe480fc194429db59b3517ac2becff/documents?acc_token=149ad798bd474ec4af76cd8e6756b307 HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 409
    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/c683de25eb294b5fa8cc8294ec9fe908?KeyID=8f2f71ed&Signature=EI3h6z2srrKfB3oKk6GCDmuT%2BIsNpz1VxprMTQalWzXlnkQeKgbp0A9RRUEoW1dRBfUduSUxAa5AUQQNvqgsAQ%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/a3fe480fc194429db59b3517ac2becff/documents/2a0f652e19154a218c608f42a5c448e0
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/c683de25eb294b5fa8cc8294ec9fe908?KeyID=8f2f71ed&Signature=b1At6NDAC3JTU6fDd9uTHG1sI%2FzioJcoVHbxqTzZAELtHr3FwOjQ9yMpVBRf%2FFrizC84qhF2xqlfr51ifFqoBg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-03-29T15:47:34.401607+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-03-29T15:47:34.401638+03:00",
        "id": "2a0f652e19154a218c608f42a5c448e0"
      }
    }