Fin. Tutorial

Tutorial for the dgfFinancialAssets procedure.

Creating auction

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

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

{
  "data": {
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "auctionPeriod": {
      "startDate": "2018-07-25"
    },
    "tenderAttempts": 1,
    "procurementMethodType": "DGFFinancialAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "submissionMethodDetails": "test submissionMethodDetails",
    "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
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51
X-Content-Type-Options: nosniff

{
  "access": {
    "transfer": "676389c2fd3d4fdb8ac067141b935f20",
    "token": "db0b1dca507d466cb1b74576d5e23c52"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2018-07-11-000002",
    "enquiryPeriod": {
      "startDate": "2018-07-11T15:06:06.538858+03:00",
      "endDate": "2018-07-24T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2018-07-24T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "1bd0478dee5b4b0581e2d1bf7f47fa51",
    "eligibilityCriteria_ru": "Участником электронного аукциона, предметом продажи на которых являются права требования по кредитным договорам и договорам обеспечения, не может быть пользователь, являющийся заёмщиком (должником относительно банка) и\\или поручителем (имущественным поручителем) по таким кредитным договорам и/или договорам обеспечения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2018-07-11T15:06:06.539174+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2018-07-11T15:06:06.539196+03:00",
        "id": "556fede524934437bb9007bb38802230"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "The user, who is the borrower (the debtor of the bank) and/or guarantor (property guarantor) for loan agreements and/or collateral agreements, cannot be the bidder of the electronic auction, where the items for sale are the claim rights on such loan agreements and collateral agreements.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2018-07-11T15:06:06.541629+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "Учасником електронного аукціону, предметом продажу на яких є права вимоги за кредитними договорами та договорами забезпечення, не може бути користувач, який є позичальником (боржником відносно банку) та/або поручителем (майновим поручителем) за такими кредитними договорами та/або договорами забезпечення.",
    "tenderPeriod": {
      "startDate": "2018-07-11T15:06:06.538858+03:00",
      "endDate": "2018-07-24T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2018-07-25T00:00:00+03:00"
    },
    "procurementMethodType": "DGFFinancialAssets",
    "dgfID": "219560",
    "date": "2018-07-11T15:06:06.538858+03:00",
    "submissionMethodDetails": "test submissionMethodDetails",
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "06000000-2"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "edca5775bbe6417b8afd6b794a9ff190",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.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.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2018-07-11-000002",
    "enquiryPeriod": {
      "startDate": "2018-07-11T15:06:06.538858+03:00",
      "endDate": "2018-07-24T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2018-07-24T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "1bd0478dee5b4b0581e2d1bf7f47fa51",
    "eligibilityCriteria_ru": "Участником электронного аукциона, предметом продажи на которых являются права требования по кредитным договорам и договорам обеспечения, не может быть пользователь, являющийся заёмщиком (должником относительно банка) и\\или поручителем (имущественным поручителем) по таким кредитным договорам и/или договорам обеспечения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2018-07-11T15:06:06.539174+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2018-07-11T15:06:06.539196+03:00",
        "id": "556fede524934437bb9007bb38802230"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "The user, who is the borrower (the debtor of the bank) and/or guarantor (property guarantor) for loan agreements and/or collateral agreements, cannot be the bidder of the electronic auction, where the items for sale are the claim rights on such loan agreements and collateral agreements.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2018-07-11T15:06:06.541629+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "Учасником електронного аукціону, предметом продажу на яких є права вимоги за кредитними договорами та договорами забезпечення, не може бути користувач, який є позичальником (боржником відносно банку) та/або поручителем (майновим поручителем) за такими кредитними договорами та/або договорами забезпечення.",
    "tenderPeriod": {
      "startDate": "2018-07-11T15:06:06.538858+03:00",
      "endDate": "2018-07-24T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2018-07-25T00:00:00+03:00"
    },
    "procurementMethodType": "DGFFinancialAssets",
    "dgfID": "219560",
    "date": "2018-07-11T15:06:06.538858+03:00",
    "submissionMethodDetails": "test submissionMethodDetails",
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "06000000-2"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "edca5775bbe6417b8afd6b794a9ff190",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.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.5/auctions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "next_page": {
    "path": "/api/2.5/auctions?offset=",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.5/auctions?offset=",
    "offset": ""
  },
  "data": []
}

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.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents?acc_token=db0b1dca507d466cb1b74576d5e23c52 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 412
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/1ac184ba38634610bcb878b445308360?KeyID=172d32c8&Signature=6HYDkcJljNBrdRxhZwgKmJyVXEbnBS6g7VEqkjTea8fwekXxvNwHPkLR1cc2tJusq%2FK1tew5D9bx6xRZ9CXFDA%3D%3D",
    "format": "application/pdf",
    "documentType": "technicalSpecifications"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents/943764a2ec944dea859f242236e32975
X-Content-Type-Options: nosniff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ac184ba38634610bcb878b445308360?KeyID=172d32c8&Signature=2Y%2FPNHdAQL0vHdV0Z%252BTfDTJiA8OMu8ER04jVygL4RdYIFbhgiHdKpKPT%2F7RkAJltTu8XQjZtfJOY2X0D5fZEAQ%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.609510+03:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2018-07-11T15:06:06.609531+03:00",
    "id": "943764a2ec944dea859f242236e32975"
  }
}

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.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents/943764a2ec944dea859f242236e32975 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ac184ba38634610bcb878b445308360?KeyID=172d32c8&Signature=2Y%2FPNHdAQL0vHdV0Z%252BTfDTJiA8OMu8ER04jVygL4RdYIFbhgiHdKpKPT%2F7RkAJltTu8XQjZtfJOY2X0D5fZEAQ%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.609510+03:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2018-07-11T15:06:06.609531+03:00",
    "id": "943764a2ec944dea859f242236e32975"
  }
}

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

POST /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents?acc_token=db0b1dca507d466cb1b74576d5e23c52 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/f2b13729f22c4cd9b2280cdcd5f3191f?KeyID=172d32c8&Signature=tNL3CB9ViSy8vTUxS7d79FZkPjRrpBYeYgb6Rrq5%2Fq4O1L2HBNFdz96J5Ibyi4108raVfhnLSraE4Dnrf5j7BA%3D%3D",
    "title": "AwardCriteria.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents/6d5fced0129d424294cbd1e43f503120
X-Content-Type-Options: nosniff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f2b13729f22c4cd9b2280cdcd5f3191f?KeyID=172d32c8&Signature=8OyAfdntjoU%252BLXpBecddhIHcqQtLw3wU9BERrJhUef5uwjNYmUa5gFzQAUYntmcaeHdEXb2LzcBNrI5KhMP%252BAA%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.664005+03:00",
    "dateModified": "2018-07-11T15:06:06.664026+03:00",
    "id": "6d5fced0129d424294cbd1e43f503120"
  }
}

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

GET /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.539174+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-07-11T15:06:06.539196+03:00",
      "id": "556fede524934437bb9007bb38802230"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ac184ba38634610bcb878b445308360?KeyID=172d32c8&Signature=2Y%2FPNHdAQL0vHdV0Z%252BTfDTJiA8OMu8ER04jVygL4RdYIFbhgiHdKpKPT%2F7RkAJltTu8XQjZtfJOY2X0D5fZEAQ%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.609510+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-07-11T15:06:06.609531+03:00",
      "id": "943764a2ec944dea859f242236e32975"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f2b13729f22c4cd9b2280cdcd5f3191f?KeyID=172d32c8&Signature=8OyAfdntjoU%252BLXpBecddhIHcqQtLw3wU9BERrJhUef5uwjNYmUa5gFzQAUYntmcaeHdEXb2LzcBNrI5KhMP%252BAA%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.664005+03:00",
      "dateModified": "2018-07-11T15:06:06.664026+03:00",
      "id": "6d5fced0129d424294cbd1e43f503120"
    }
  ]
}

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

PUT /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents/6d5fced0129d424294cbd1e43f503120?acc_token=db0b1dca507d466cb1b74576d5e23c52 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 340
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/99bc7df92cae458bb04ecad685229969?KeyID=172d32c8&Signature=dhhoE%2BvO%2FjEWopydn97f2T4RWqExHa1hz29WQWKsooWjHR%2BdQ7SK4gYKOo0cd1ihSMgmJDBC3d1bR17l6IefDQ%3D%3D",
    "title": "AwardCriteria-2.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/99bc7df92cae458bb04ecad685229969?KeyID=172d32c8&Signature=pjM1Q5R59JDAuSlrirE%2FHkIkAQP84sjdKsM1Cy1HHfNdFNVI0G29wgNvyYpyhtZfJMvNMUOurSaJoaA20ip%2FBQ%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.664005+03:00",
    "dateModified": "2018-07-11T15:06:06.721944+03:00",
    "id": "6d5fced0129d424294cbd1e43f503120"
  }
}

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

GET /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.539174+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-07-11T15:06:06.539196+03:00",
      "id": "556fede524934437bb9007bb38802230"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1ac184ba38634610bcb878b445308360?KeyID=172d32c8&Signature=2Y%2FPNHdAQL0vHdV0Z%252BTfDTJiA8OMu8ER04jVygL4RdYIFbhgiHdKpKPT%2F7RkAJltTu8XQjZtfJOY2X0D5fZEAQ%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.609510+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-07-11T15:06:06.609531+03:00",
      "id": "943764a2ec944dea859f242236e32975"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/99bc7df92cae458bb04ecad685229969?KeyID=172d32c8&Signature=pjM1Q5R59JDAuSlrirE%2FHkIkAQP84sjdKsM1Cy1HHfNdFNVI0G29wgNvyYpyhtZfJMvNMUOurSaJoaA20ip%2FBQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.664005+03:00",
      "dateModified": "2018-07-11T15:06:06.721944+03:00",
      "id": "6d5fced0129d424294cbd1e43f503120"
    }
  ]
}

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.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents?acc_token=0052e89467e54a799389e87c87910599 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 432
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/da7171338cfd40daaf0a363d1da7be8c?KeyID=172d32c8&Signature=44NDlwGUSjchl%2F1E9rd8cJIkXYeL%2FbHuVYTGAW8qTMiKBcATXGrfJC3TFdBElOlF%2FLmzbRZmQOGj3UmUjE7dBg%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents/dbe0ca0c582b422d84c59a2aa93eb948
X-Content-Type-Options: nosniff

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/da7171338cfd40daaf0a363d1da7be8c?KeyID=172d32c8&Signature=UPMVnKZTzNNA9AxDywJSZbpPjStBGoee80QWYvawEzzQnVYTxYuijJO8UMScqwMcbt5qrdjYn5jyfUyhvZzkDA%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:07.828825+03:00",
    "documentType": "illustration",
    "dateModified": "2018-07-11T15:06:07.828844+03:00",
    "id": "dbe0ca0c582b422d84c59a2aa93eb948"
  }
}

We can check whether illustration is uploaded.

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


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.421619+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-07-11T15:06:07.421641+03:00",
      "id": "779f993a42c54eadadff72d66788fb23"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/a1cca399506447ed928a0d54f2f7be6c?KeyID=172d32c8&Signature=mKn74kqdS1gCIQ9BYDZNP8bHiXS%252BBKgRnCOaCo4ZsT7riQl2NEPUoJfa6wN%2Fwo2VccvpcIdRhvRrQL8NFtBsCg%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.649805+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-07-11T15:06:07.649826+03:00",
      "id": "bb517ba5ca544fd7b21eaf894a63afd7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1a8b26fa32cb42f3a69ba72c28d5db51?KeyID=172d32c8&Signature=y9meT2iCjfA5YdUhT1lSEZ1%252BIFYd6mMcv5sauCMDJCQAoifkdIUo4zgmMqZ%2FzGbJJlixeUdA5n5%252BFhLTkfDOCQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.703749+03:00",
      "dateModified": "2018-07-11T15:06:07.765929+03:00",
      "id": "cf91c283f3b04cb5a76d9368d69c161f"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/da7171338cfd40daaf0a363d1da7be8c?KeyID=172d32c8&Signature=UPMVnKZTzNNA9AxDywJSZbpPjStBGoee80QWYvawEzzQnVYTxYuijJO8UMScqwMcbt5qrdjYn5jyfUyhvZzkDA%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.828825+03:00",
      "documentType": "illustration",
      "dateModified": "2018-07-11T15:06:07.828844+03:00",
      "id": "dbe0ca0c582b422d84c59a2aa93eb948"
    }
  ]
}

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

POST /api/2.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents?acc_token=0052e89467e54a799389e87c87910599 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 428
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/240fe6c71e5a4291a3c9e39fbfeb460e?KeyID=172d32c8&Signature=aiaYSVot6s3YWRq8zdCetQDBq2FwrP1LstPmGw6EcG5s4bTvKFYjg0EnTewJ7KV14YbTt8DHzOhiPpb0hJirAA%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents/402f115c7eb445c3a42eb624d2b45e17
X-Content-Type-Options: nosniff

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/240fe6c71e5a4291a3c9e39fbfeb460e?KeyID=172d32c8&Signature=k8V7cIG6xo5fopPWo%252B%2Fl3mxaliitImmqxRxKPbsJATjwe8Fde63J7%252BzgghykfYCTn9QwuMx1aVg1G6iNu7PNDg%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:07.897398+03:00",
    "documentType": "illustration",
    "dateModified": "2018-07-11T15:06:07.897419+03:00",
    "id": "402f115c7eb445c3a42eb624d2b45e17"
  }
}

Add third illustration:

POST /api/2.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents?acc_token=0052e89467e54a799389e87c87910599 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 442
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/e401fae3f2004d11ac67e9b444eb6d09?KeyID=172d32c8&Signature=Mxs%2F2%2B03GvbmBy%2FZePxtBa8qVpaWmWJ1t%2FyuYSRbQTb%2Fm2Pw%2BvhOGL3n%2B2jOpvRdAroJNQHk5OFyYBI3q%2FMvAw%3D%3D",
    "format": "image/jpeg",
    "documentType": "illustration"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents/feae4575ced24c718bae0f05d904c810
X-Content-Type-Options: nosniff

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/e401fae3f2004d11ac67e9b444eb6d09?KeyID=172d32c8&Signature=h7%2FVgGCvrQZMhz5xn6tYcxZ809Rxn25ohwJIoTihWblO8DCl2FHeJwFkHE3ZGUZeHBWCQ8ANi5eQEUiyd78qAg%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:07.952905+03:00",
    "documentType": "illustration",
    "dateModified": "2018-07-11T15:06:07.952925+03:00",
    "id": "feae4575ced24c718bae0f05d904c810"
  }
}

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.5/auctions/bb1795e42a4243ada1433ddb18b4f06f/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": [
    {
      "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
      "url": "http://torgi.fg.gov.ua/prozorrosale",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.421619+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-07-11T15:06:07.421641+03:00",
      "id": "779f993a42c54eadadff72d66788fb23"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/a1cca399506447ed928a0d54f2f7be6c?KeyID=172d32c8&Signature=mKn74kqdS1gCIQ9BYDZNP8bHiXS%252BBKgRnCOaCo4ZsT7riQl2NEPUoJfa6wN%2Fwo2VccvpcIdRhvRrQL8NFtBsCg%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.649805+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-07-11T15:06:07.649826+03:00",
      "id": "bb517ba5ca544fd7b21eaf894a63afd7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1a8b26fa32cb42f3a69ba72c28d5db51?KeyID=172d32c8&Signature=y9meT2iCjfA5YdUhT1lSEZ1%252BIFYd6mMcv5sauCMDJCQAoifkdIUo4zgmMqZ%2FzGbJJlixeUdA5n5%252BFhLTkfDOCQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.703749+03:00",
      "dateModified": "2018-07-11T15:06:07.765929+03:00",
      "id": "cf91c283f3b04cb5a76d9368d69c161f"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/da7171338cfd40daaf0a363d1da7be8c?KeyID=172d32c8&Signature=UPMVnKZTzNNA9AxDywJSZbpPjStBGoee80QWYvawEzzQnVYTxYuijJO8UMScqwMcbt5qrdjYn5jyfUyhvZzkDA%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.828825+03:00",
      "documentType": "illustration",
      "dateModified": "2018-07-11T15:06:07.828844+03:00",
      "id": "dbe0ca0c582b422d84c59a2aa93eb948"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/240fe6c71e5a4291a3c9e39fbfeb460e?KeyID=172d32c8&Signature=k8V7cIG6xo5fopPWo%252B%2Fl3mxaliitImmqxRxKPbsJATjwe8Fde63J7%252BzgghykfYCTn9QwuMx1aVg1G6iNu7PNDg%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.897398+03:00",
      "documentType": "illustration",
      "dateModified": "2018-07-11T15:06:07.897419+03:00",
      "id": "402f115c7eb445c3a42eb624d2b45e17"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/e401fae3f2004d11ac67e9b444eb6d09?KeyID=172d32c8&Signature=h7%2FVgGCvrQZMhz5xn6tYcxZ809Rxn25ohwJIoTihWblO8DCl2FHeJwFkHE3ZGUZeHBWCQ8ANi5eQEUiyd78qAg%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:07.952905+03:00",
      "documentType": "illustration",
      "dateModified": "2018-07-11T15:06:07.952925+03:00",
      "id": "feae4575ced24c718bae0f05d904c810"
    }
  ]
}

Adding virtual data room

Organizer can add URL for virtual data room:

POST /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents?acc_token=db0b1dca507d466cb1b74576d5e23c52 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
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/documents/b128b0fce67a4338b3879ae6278c9d06
X-Content-Type-Options: nosniff

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.780364+03:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2018-07-11T15:06:06.780384+03:00",
    "id": "b128b0fce67a4338b3879ae6278c9d06"
  }
}

Registering bid

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

POST /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/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
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0
X-Content-Type-Options: nosniff

{
  "access": {
    "token": "de594836f1544ab69b444235f3f05693"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2018-07-11T15:06:06.831455+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": "2f94ff64e9854aeb8083c26bf5a85ab0"
  }
}

And activate a bid:

PATCH /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0?acc_token=de594836f1544ab69b444235f3f05693 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
X-Content-Type-Options: nosniff

null

And upload license (with documentType: financialLicense):

POST /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0/documents?acc_token=de594836f1544ab69b444235f3f05693 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 379
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/69a1f0170b6d46008059817aa7972bca?KeyID=172d32c8&Signature=61mkM%2Bdv2upZuuuZHz7UjAjoZZmsZTKLmik0PQ56C50uqsaTSp7afctEv%2FsbUCboQ%2B9T6R%2B1S6IYzYY7oQCsBQ%3D%3D",
    "title": "FinancialLicense.pdf",
    "format": "application/pdf",
    "hash": "md5:00000000000000000000000000000000",
    "documentType": "financialLicense"
  }
}


201 Created
Content-Type: application/json
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0/documents/fd33a0a111634641bb733b0467fd4337
X-Content-Type-Options: nosniff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0/documents/fd33a0a111634641bb733b0467fd4337?download=69a1f0170b6d46008059817aa7972bca",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2018-07-11T15:06:06.919296+03:00",
    "documentType": "financialLicense",
    "dateModified": "2018-07-11T15:06:06.919314+03:00",
    "id": "fd33a0a111634641bb733b0467fd4337"
  }
}

It is possible to check the uploaded documents:

GET /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0/documents?acc_token=de594836f1544ab69b444235f3f05693 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.ea.openprocurement.org


200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/2f94ff64e9854aeb8083c26bf5a85ab0/documents/fd33a0a111634641bb733b0467fd4337?download=69a1f0170b6d46008059817aa7972bca",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2018-07-11T15:06:06.919296+03:00",
      "documentType": "financialLicense",
      "dateModified": "2018-07-11T15:06:06.919314+03:00",
      "id": "fd33a0a111634641bb733b0467fd4337"
    }
  ]
}

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

POST /api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/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
Location: http://api-sandbox.ea.openprocurement.org/api/2.5/auctions/1bd0478dee5b4b0581e2d1bf7f47fa51/bids/d9bb731980a14b76872e07b506803203
X-Content-Type-Options: nosniff

{
  "access": {
    "token": "b657058be68c4b73871152fef26a96ed"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2018-07-11T15:06:07.011228+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": "d9bb731980a14b76872e07b506803203"
  }
}