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.4/auctions/bf6575a30f2c4465ae43e06981df3b5a/documents?acc_token=686740317fd249638e3ee0420d268ebf HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 419
    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/1ce52fd03573440ba6b1731c6c9cecea?KeyID=172d32c8&Signature=TdmyfoIiQi%2Bj2E%2B54IBcPh3YMjjAxnYE%2BWaiMKNKMdp%2Bl%2B2pLQ%2FXXdax9TBqMlUEU584ld3hjHRmYSQqiuKeDg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    
    201 Created
    Content-Type: application/json
    Location: http://api-sandbox.ea.openprocurement.org/api/2.4/auctions/bf6575a30f2c4465ae43e06981df3b5a/documents/806548dfbbbd4c64a320cd6a2493c942
    X-Content-Type-Options: nosniff
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ce52fd03573440ba6b1731c6c9cecea?KeyID=172d32c8&Signature=XDud%252BUyeXQuy9iOTIwWE5%2FBSWPmsPRKjG4XveLWCa1z%252B4JJKJDzTSOGkFVRpqZzb66rODALSr36dEGC%2F1qsXAQ%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2018-07-05T15:44:43.962162+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2018-07-05T15:44:43.962214+03:00",
        "id": "806548dfbbbd4c64a320cd6a2493c942"
      }
    }
    
  3. Upload document in document service.

Upload document without registration

  1. Upload document without registration.

  2. Add document in API:

    POST /api/2.4/auctions/bf6575a30f2c4465ae43e06981df3b5a/documents?acc_token=686740317fd249638e3ee0420d268ebf HTTP/1.0
    Authorization: Basic YnJva2VyOg==
    Content-Length: 419
    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/1ce52fd03573440ba6b1731c6c9cecea?KeyID=172d32c8&Signature=TdmyfoIiQi%2Bj2E%2B54IBcPh3YMjjAxnYE%2BWaiMKNKMdp%2Bl%2B2pLQ%2FXXdax9TBqMlUEU584ld3hjHRmYSQqiuKeDg%3D%3D",
        "format": "application/pdf",
        "documentType": "technicalSpecifications"
      }
    }
    
    
    201 Created
    Content-Type: application/json
    Location: http://api-sandbox.ea.openprocurement.org/api/2.4/auctions/bf6575a30f2c4465ae43e06981df3b5a/documents/806548dfbbbd4c64a320cd6a2493c942
    X-Content-Type-Options: nosniff
    
    {
      "data": {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description",
        "format": "application/pdf",
        "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ce52fd03573440ba6b1731c6c9cecea?KeyID=172d32c8&Signature=XDud%252BUyeXQuy9iOTIwWE5%2FBSWPmsPRKjG4XveLWCa1z%252B4JJKJDzTSOGkFVRpqZzb66rODALSr36dEGC%2F1qsXAQ%253D%253D",
        "title": "Notice.pdf",
        "documentOf": "tender",
        "datePublished": "2018-07-05T15:44:43.962162+03:00",
        "documentType": "technicalSpecifications",
        "dateModified": "2018-07-05T15:44:43.962214+03:00",
        "id": "806548dfbbbd4c64a320cd6a2493c942"
      }
    }