Fin. Tutorial

Tutorial for the dgfFinancialAssets procedure.

Creating auction

Let’s create auction with the minimal data set (only required properties):

POST /api/2.3/auctions?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2032
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "auctionPeriod": {
      "startDate": "2017-04-21"
    },
    "tenderAttempts": 1,
    "procurementMethodType": "dgfFinancialAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "dgfDecisionDate": "2016-11-17",
    "dgfID": "219560",
    "dgfDecisionID": "219560",
    "procurementMethodDetails": "quick, accelerator=1440",
    "items": [
      {
        "classification": {
          "scheme": "CAV",
          "id": "06000000-2",
          "description": "Земельні ділянки"
        },
        "quantity": 5,
        "description": "Земля для військовослужбовців",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        }
      }
    ],
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    }
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab

{
  "access": {
    "token": "7b6133ada5bc473caad389a3a31b5373"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-04-07-000001",
    "enquiryPeriod": {
      "startDate": "2017-04-07T15:31:19.065750+03:00",
      "endDate": "2017-04-20T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-04-20T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "d41ac9d44ffa4b27960f6cafb28a0cab",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-04-07T15:31:19.066097+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-04-07T15:31:19.066154+03:00",
        "id": "a29bf5d8c71c4e9d94b8c3fe2f229e51"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-04-07T15:31:19.070221+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-04-07T15:31:19.065750+03:00",
      "endDate": "2017-04-20T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-04-21T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-04-07T15:31:19.065750+03:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "06000000-2"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "3ad67c0ccb5140219f8793b156a6422d",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}

Success! Now we can see that new object has been created. Response code is 201 and Location response header reports the location of the created object. The body of response reveals the information about the created auction: its internal id (that matches the Location segment), its official auctionID and dateModified datestamp stating the moment in time when auction has been last modified. Pay attention to the procurementMethodType. Note that auction is created with active.tendering status.

Let’s access the URL of the created object (the Location header of the response):

GET /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-04-07-000001",
    "enquiryPeriod": {
      "startDate": "2017-04-07T15:31:19.065750+03:00",
      "endDate": "2017-04-20T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-04-20T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "d41ac9d44ffa4b27960f6cafb28a0cab",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-04-07T15:31:19.066097+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-04-07T15:31:19.066154+03:00",
        "id": "a29bf5d8c71c4e9d94b8c3fe2f229e51"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-04-07T15:31:19.070221+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-04-07T15:31:19.065750+03:00",
      "endDate": "2017-04-20T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-04-21T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-04-07T15:31:19.065750+03:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "06000000-2"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "3ad67c0ccb5140219f8793b156a6422d",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}

We can see the same response we got after creating auction.

Let’s see what listing of auctions reveals us:

GET /api/2.3/auctions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "next_page": {
    "path": "/api/2.3/auctions?offset=2017-04-07T15%3A31%3A19.070221%2B03%3A00",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions?offset=2017-04-07T15%3A31%3A19.070221%2B03%3A00",
    "offset": "2017-04-07T15:31:19.070221+03:00"
  },
  "data": [
    {
      "id": "d41ac9d44ffa4b27960f6cafb28a0cab",
      "dateModified": "2017-04-07T15:31:19.070221+03:00"
    }
  ]
}

We do see the auction’s internal id (that can be used to construct full URL by prepending https://api-sandbox.ea.openprocurement.org/api/0/auctions/) and its dateModified datestamp.

Uploading documentation

Organizer can upload PDF files into the created auction. Uploading should follow the Documents Uploading rules.

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents?acc_token=7b6133ada5bc473caad389a3a31b5373 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 414
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0c72f4185cf94fc8a7fe05bdfd33c446?KeyID=00fc7a9f&Signature=XMXv9QFRbdnpy1V2S7srhUD5FIht3oVkZgoUmvjrPBkkbN%2BDY0rKRceBrZWDaiuUoJFdXUBXRuVu%2F9awrXn0Ag%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/d41ac9d44ffa4b27960f6cafb28a0cab/documents/06650b9ce12a4cbfae246cb2fb5f3c07

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0c72f4185cf94fc8a7fe05bdfd33c446?KeyID=00fc7a9f&Signature=mOp7tVYsf8XcLT9eNL%252BUxfGq3gMiUzra9yFjnVesPyKEFS8vhevewr4qGOtKum6fHhgPVUoNaCu7Rr%2FxcGdSAw%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.231811+03:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2017-04-07T15:31:19.231842+03:00",
    "id": "06650b9ce12a4cbfae246cb2fb5f3c07"
  }
}

201 Created response code and Location header confirm document creation. We can additionally query the documents collection API endpoint to confirm the action:

GET /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents/06650b9ce12a4cbfae246cb2fb5f3c07 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0c72f4185cf94fc8a7fe05bdfd33c446?KeyID=00fc7a9f&Signature=mOp7tVYsf8XcLT9eNL%252BUxfGq3gMiUzra9yFjnVesPyKEFS8vhevewr4qGOtKum6fHhgPVUoNaCu7Rr%2FxcGdSAw%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.231811+03:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2017-04-07T15:31:19.231842+03:00",
    "id": "06650b9ce12a4cbfae246cb2fb5f3c07"
  }
}

The single array element describes the uploaded document. We can upload more documents:

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents?acc_token=7b6133ada5bc473caad389a3a31b5373 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 334
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2daefd2a336b4433988d306b8fa2d777?KeyID=00fc7a9f&Signature=a5hzmdLhVgqVYph5Hxb84R1DLXY45mvf7COtXY1QmnP4P1uobzaJbr8u7r%2BxuCTrymQO9gonHWy4RqXasLxnDA%3D%3D",
    "title": "AwardCriteria.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents/155a293ea2414b90a5ee1217b1ce9352

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2daefd2a336b4433988d306b8fa2d777?KeyID=00fc7a9f&Signature=%2FBeejoPoui2ljvJIDF2Qf9fIzchS8i71eH5gSCPS7%2FbS0HG7OSy4ZCA6%2FmRegoqy4uP6dErJYN8nTw%2FB3X%252BbCA%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.290601+03:00",
    "dateModified": "2017-04-07T15:31:19.290638+03:00",
    "id": "155a293ea2414b90a5ee1217b1ce9352"
  }
}

And again we can confirm that there are two documents uploaded.

GET /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.066097+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-04-07T15:31:19.066154+03:00",
      "id": "a29bf5d8c71c4e9d94b8c3fe2f229e51"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0c72f4185cf94fc8a7fe05bdfd33c446?KeyID=00fc7a9f&Signature=mOp7tVYsf8XcLT9eNL%252BUxfGq3gMiUzra9yFjnVesPyKEFS8vhevewr4qGOtKum6fHhgPVUoNaCu7Rr%2FxcGdSAw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.231811+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-04-07T15:31:19.231842+03:00",
      "id": "06650b9ce12a4cbfae246cb2fb5f3c07"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2daefd2a336b4433988d306b8fa2d777?KeyID=00fc7a9f&Signature=%2FBeejoPoui2ljvJIDF2Qf9fIzchS8i71eH5gSCPS7%2FbS0HG7OSy4ZCA6%2FmRegoqy4uP6dErJYN8nTw%2FB3X%252BbCA%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.290601+03:00",
      "dateModified": "2017-04-07T15:31:19.290638+03:00",
      "id": "155a293ea2414b90a5ee1217b1ce9352"
    }
  ]
}

In case we made an error, we can reupload the document over the older version:

PUT /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents/155a293ea2414b90a5ee1217b1ce9352?acc_token=7b6133ada5bc473caad389a3a31b5373 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 336
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/5aaeabd58992486b8bf974678c519afc?KeyID=00fc7a9f&Signature=fAjtySq6cqDlalFrCGJxqmXele50TmiBsH%2BBCBsa6WXzuYyzy4jpegScQIGHIk0adWfWtlZN25HVME53o60jDA%3D%3D",
    "title": "AwardCriteria-2.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/5aaeabd58992486b8bf974678c519afc?KeyID=00fc7a9f&Signature=i4TKp1vTlKpYZS5CoyR2KOn2GsR2RtdbG9nz6bv5NYbsxONL0GDO7f4DSAyhpmU%2FvESt1ko3c6Veo5nP9ry2CQ%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.290601+03:00",
    "dateModified": "2017-04-07T15:31:19.355254+03:00",
    "id": "155a293ea2414b90a5ee1217b1ce9352"
  }
}

And we can see that it is overriding the original version:

GET /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.066097+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-04-07T15:31:19.066154+03:00",
      "id": "a29bf5d8c71c4e9d94b8c3fe2f229e51"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0c72f4185cf94fc8a7fe05bdfd33c446?KeyID=00fc7a9f&Signature=mOp7tVYsf8XcLT9eNL%252BUxfGq3gMiUzra9yFjnVesPyKEFS8vhevewr4qGOtKum6fHhgPVUoNaCu7Rr%2FxcGdSAw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.231811+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-04-07T15:31:19.231842+03:00",
      "id": "06650b9ce12a4cbfae246cb2fb5f3c07"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/5aaeabd58992486b8bf974678c519afc?KeyID=00fc7a9f&Signature=i4TKp1vTlKpYZS5CoyR2KOn2GsR2RtdbG9nz6bv5NYbsxONL0GDO7f4DSAyhpmU%2FvESt1ko3c6Veo5nP9ry2CQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.290601+03:00",
      "dateModified": "2017-04-07T15:31:19.355254+03:00",
      "id": "155a293ea2414b90a5ee1217b1ce9352"
    }
  ]
}

Uploading illustration

Organizer can upload illustration files into the created auction. Uploading should follow the Documents Uploading rules.

In order to specify illustration display order, index field can be used (for details see Document). Since this illustration should be displayed first, it has "index": 1.

POST /api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents?acc_token=5303e3bebff44ed3a5a9f8f7db899743 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 438
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "title": "first_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/746b61b2d1264604b1e98c058ac1740f?KeyID=df79319d&Signature=Gc3B2F2yC9%2FB8cg2NSdB4srgDKZnSFVydhfK2acfFSGrAmhqb9DPaty0%2Fa%2F5iY0fqYOkY%2FkFDtnvz%2BUlKY%2BUBA%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents/76b72b2fd48a4a61a99eef1ae5ebbb1c

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/746b61b2d1264604b1e98c058ac1740f?KeyID=df79319d&Signature=982LynSZlgaXIbNRD9RoN8In%252B2VO3UW7AZPg9DSooxblspu2xjGPigezf5GiMG9j1d2xE%252B9%2FZUG%2FHY3GyJ5WCw%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:21.345637+03:00",
    "documentType": "illustration",
    "dateModified": "2017-04-07T15:31:21.345663+03:00",
    "id": "76b72b2fd48a4a61a99eef1ae5ebbb1c"
  }
}

We can check whether illustration is uploaded.

GET /api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:20.714686+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-04-07T15:31:20.714721+03:00",
      "id": "345103188a104e4b9cde2d28c24afb37"
    },
    {
      "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"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/b01d0e1c43b6412a85bebafe91534ee0?KeyID=df79319d&Signature=ZVHrYmy%2FAAY2Qq4J1Fr%2FfxqDK2P2cXFlXcNm0mlbn%252BYm0aYsDYun8R%252BrjFLgV%2FGey67oYqZxwWaAQXn53zSXCg%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.205404+03:00",
      "dateModified": "2017-04-07T15:31:21.274489+03:00",
      "id": "16e007ddfe38495f9eb9632916bdc119"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/746b61b2d1264604b1e98c058ac1740f?KeyID=df79319d&Signature=982LynSZlgaXIbNRD9RoN8In%252B2VO3UW7AZPg9DSooxblspu2xjGPigezf5GiMG9j1d2xE%252B9%2FZUG%2FHY3GyJ5WCw%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.345637+03:00",
      "documentType": "illustration",
      "dateModified": "2017-04-07T15:31:21.345663+03:00",
      "id": "76b72b2fd48a4a61a99eef1ae5ebbb1c"
    }
  ]
}

Organizer can upload second illustration. This illustration should be displayed second, so it has "index": 2.

POST /api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents?acc_token=5303e3bebff44ed3a5a9f8f7db899743 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 430
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "title": "second_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/8b5e76acca8148d492d44fae7b821cb3?KeyID=df79319d&Signature=2liAez4DlOJjoISUu826Fjf0k6Ng6R2wTFtotgAkvVNbFHu8KGOlH6vJugXObk8U%2FT5QDHiF1h7OB1XPLzUrDw%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents/55976c9629af4c019ea720089cf11433

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/8b5e76acca8148d492d44fae7b821cb3?KeyID=df79319d&Signature=2bswW9s0i7HgLGfpy8lRozJ7y%252Bu17vN0AumIUYcxCPXoHygorapn36ezzuVSquGnfW66NV%252BEPS4zkV9os1AyDw%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:21.455148+03:00",
    "documentType": "illustration",
    "dateModified": "2017-04-07T15:31:21.455217+03:00",
    "id": "55976c9629af4c019ea720089cf11433"
  }
}

Add third illustration:

POST /api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents?acc_token=5303e3bebff44ed3a5a9f8f7db899743 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 430
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "title": "third_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9326da9980b0434fb6887ffaa9cb9b43?KeyID=df79319d&Signature=eZ82BR29z3EwUPBAi3qY3r0Mx1gTuJJ3Bwug%2FQMjsI%2FY4g7I2TFJkFGYhOEOh7LrlEGrbRbuRCjJ9R1JC4X1Cw%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents/a3f7774f77a448619ba16aa270100d21

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9326da9980b0434fb6887ffaa9cb9b43?KeyID=df79319d&Signature=tjmY%2FqWF7xtF5XwneSbWfiQ%2F0RsWQeVbeEph6SvyDoYxkCUdPrAIlZaJOtEk7x44Z4wBO4oSbUt8OAEXovzYBQ%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:21.525229+03:00",
    "documentType": "illustration",
    "dateModified": "2017-04-07T15:31:21.525267+03:00",
    "id": "a3f7774f77a448619ba16aa270100d21"
  }
}

Note that index of the third illustration is the same as for the second illustration: "index": 2. In such cases firstly will be displayed illustration that was uploaded earlier.

We can check that there are three uploaded illustrations.

GET /api/2.3/auctions/331e9ef3d78d46cfb3df35c17b0650c7/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:20.714686+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-04-07T15:31:20.714721+03:00",
      "id": "345103188a104e4b9cde2d28c24afb37"
    },
    {
      "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"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/b01d0e1c43b6412a85bebafe91534ee0?KeyID=df79319d&Signature=ZVHrYmy%2FAAY2Qq4J1Fr%2FfxqDK2P2cXFlXcNm0mlbn%252BYm0aYsDYun8R%252BrjFLgV%2FGey67oYqZxwWaAQXn53zSXCg%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.205404+03:00",
      "dateModified": "2017-04-07T15:31:21.274489+03:00",
      "id": "16e007ddfe38495f9eb9632916bdc119"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/746b61b2d1264604b1e98c058ac1740f?KeyID=df79319d&Signature=982LynSZlgaXIbNRD9RoN8In%252B2VO3UW7AZPg9DSooxblspu2xjGPigezf5GiMG9j1d2xE%252B9%2FZUG%2FHY3GyJ5WCw%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.345637+03:00",
      "documentType": "illustration",
      "dateModified": "2017-04-07T15:31:21.345663+03:00",
      "id": "76b72b2fd48a4a61a99eef1ae5ebbb1c"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/8b5e76acca8148d492d44fae7b821cb3?KeyID=df79319d&Signature=2bswW9s0i7HgLGfpy8lRozJ7y%252Bu17vN0AumIUYcxCPXoHygorapn36ezzuVSquGnfW66NV%252BEPS4zkV9os1AyDw%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.455148+03:00",
      "documentType": "illustration",
      "dateModified": "2017-04-07T15:31:21.455217+03:00",
      "id": "55976c9629af4c019ea720089cf11433"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9326da9980b0434fb6887ffaa9cb9b43?KeyID=df79319d&Signature=tjmY%2FqWF7xtF5XwneSbWfiQ%2F0RsWQeVbeEph6SvyDoYxkCUdPrAIlZaJOtEk7x44Z4wBO4oSbUt8OAEXovzYBQ%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:21.525229+03:00",
      "documentType": "illustration",
      "dateModified": "2017-04-07T15:31:21.525267+03:00",
      "id": "a3f7774f77a448619ba16aa270100d21"
    }
  ]
}

Adding virtual data room

Organizer can add URL for virtual data room:

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents?acc_token=7b6133ada5bc473caad389a3a31b5373 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 127
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://virtial-data-room.com/id_of_room",
    "title": "VDR for auction lot",
    "documentType": "virtualDataRoom"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/documents/e9147fdf2a164cd8907c5d2ba3d8f68b

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.440500+03:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2017-04-07T15:31:19.440545+03:00",
    "id": "e9147fdf2a164cd8907c5d2ba3d8f68b"
  }
}

Registering bid

Bidder can register a bid in draft status. Bidder must specify UA-FIN value for the additionalIdentifiers parameter.

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1004
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "qualified": true,
    "tenderers": [
      {
        "additionalIdentifiers": [
          {
            "scheme": "UA-FIN",
            "id": "А01 457213"
          }
        ],
        "contactPoint": {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00037256",
          "uri": "http://www.dus.gov.ua/"
        },
        "name": "Державне управління справами",
        "address": {
          "countryName": "Україна",
          "postalCode": "01220",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 469,
      "valueAddedTaxIncluded": true
    },
    "eligible": true
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679

{
  "access": {
    "token": "a6d77b97e3654b229c529a1f00a31f00"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-04-07T15:31:19.497888+03:00",
    "qualified": true,
    "tenderers": [
      {
        "additionalIdentifiers": [
          {
            "scheme": "UA-FIN",
            "id": "А01 457213"
          }
        ],
        "contactPoint": {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00037256",
          "uri": "http://www.dus.gov.ua/"
        },
        "name": "Державне управління справами",
        "address": {
          "postalCode": "01220",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        }
      }
    ],
    "owner": "broker",
    "id": "7f9a666a1d6c4335b25147fbf2e66679"
  }
}

And activate a bid:

PATCH /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679?acc_token=a6d77b97e3654b229c529a1f00a31f00 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

null

And upload license (with documentType: financialLicense):

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679/documents?acc_token=a6d77b97e3654b229c529a1f00a31f00 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 371
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/98b759cc32644f1299eff3b81d3bfcf6?KeyID=00fc7a9f&Signature=Y9wwHqrsWQPDCfr9BAIHIBIh27hYdL9fbLjMpfoW30QIFpueHqyHSqKL15t69Xel8t9UE4JqXsgFfhJs8jGBDQ%3D%3D",
    "title": "FinancialLicense.pdf",
    "format": "application/pdf",
    "hash": "md5:00000000000000000000000000000000",
    "documentType": "financialLicense"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679/documents/fa7e0ab06305414ca0c878fae8a297a2

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679/documents/fa7e0ab06305414ca0c878fae8a297a2?download=98b759cc32644f1299eff3b81d3bfcf6",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2017-04-07T15:31:19.603415+03:00",
    "documentType": "financialLicense",
    "dateModified": "2017-04-07T15:31:19.603449+03:00",
    "id": "fa7e0ab06305414ca0c878fae8a297a2"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679/documents?acc_token=a6d77b97e3654b229c529a1f00a31f00 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/7f9a666a1d6c4335b25147fbf2e66679/documents/fa7e0ab06305414ca0c878fae8a297a2?download=98b759cc32644f1299eff3b81d3bfcf6",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2017-04-07T15:31:19.603415+03:00",
      "documentType": "financialLicense",
      "dateModified": "2017-04-07T15:31:19.603449+03:00",
      "id": "fa7e0ab06305414ca0c878fae8a297a2"
    }
  ]
}

For the best effect (biggest economy) auction should have multiple bidders registered:

POST /api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1004
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "qualified": true,
    "tenderers": [
      {
        "additionalIdentifiers": [
          {
            "scheme": "UA-FIN",
            "id": "А01 457213"
          }
        ],
        "contactPoint": {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00037256",
          "uri": "http://www.dus.gov.ua/"
        },
        "name": "Державне управління справами",
        "address": {
          "countryName": "Україна",
          "postalCode": "01220",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "locality": "м. Київ"
        }
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 479,
      "valueAddedTaxIncluded": true
    },
    "eligible": true
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/d41ac9d44ffa4b27960f6cafb28a0cab/bids/53501f1263054c15baa948a61ba33035

{
  "access": {
    "token": "1ecb31b00d384131ace6b65a6cfa0be6"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-04-07T15:31:19.704541+03:00",
    "qualified": true,
    "tenderers": [
      {
        "additionalIdentifiers": [
          {
            "scheme": "UA-FIN",
            "id": "А01 457213"
          }
        ],
        "contactPoint": {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00037256",
          "uri": "http://www.dus.gov.ua/"
        },
        "name": "Державне управління справами",
        "address": {
          "postalCode": "01220",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова, 11, корпус 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        }
      }
    ],
    "owner": "broker",
    "id": "53501f1263054c15baa948a61ba33035"
  }
}