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/331e9ef3d78d46cfb3df35c17b0650c7/documents?acc_token=5303e3bebff44ed3a5a9f8f7db899743 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/0f4fa89c2d474b758b69c4519deb4669?KeyID=df79319d&Signature=LxBTbmhazeLX4GDpNekBawKJLoQI%2BVaXLQX0Jub0vRia906oaGivDck7rN7XLJJEb3Ov1pARvjaZPBm1qLYJAg%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/331e9ef3d78d46cfb3df35c17b0650c7/documents/5b056653d3ba44c3a31e42b36c211250
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0f4fa89c2d474b758b69c4519deb4669?KeyID=df79319d&Signature=NFKTdJ0NEPpLGoHhQLj5BZk%252BcMcqYYNmDSaC728CSeFbAJVf4%252B1r1DSbxnVNomhP%2FCJLp4AScSrdoKcwlI1QCg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-04-07T15:31:21.147289+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-04-07T15:31:21.147318+03:00",
        "id": "5b056653d3ba44c3a31e42b36c211250"
      }
    }
    
  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/331e9ef3d78d46cfb3df35c17b0650c7/documents?acc_token=5303e3bebff44ed3a5a9f8f7db899743 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/0f4fa89c2d474b758b69c4519deb4669?KeyID=df79319d&Signature=LxBTbmhazeLX4GDpNekBawKJLoQI%2BVaXLQX0Jub0vRia906oaGivDck7rN7XLJJEb3Ov1pARvjaZPBm1qLYJAg%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/331e9ef3d78d46cfb3df35c17b0650c7/documents/5b056653d3ba44c3a31e42b36c211250
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0f4fa89c2d474b758b69c4519deb4669?KeyID=df79319d&Signature=NFKTdJ0NEPpLGoHhQLj5BZk%252BcMcqYYNmDSaC728CSeFbAJVf4%252B1r1DSbxnVNomhP%2FCJLp4AScSrdoKcwlI1QCg%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2017-04-07T15:31:21.147289+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2017-04-07T15:31:21.147318+03:00",
        "id": "5b056653d3ba44c3a31e42b36c211250"
      }
    }