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": "2018-03-27"
    },
    "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/72f943f337ff4470acaa2e958316ecc3

{
  "access": {
    "token": "58a3a8eb4997408aa23bfbd8c0828132"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2018-03-13-000001",
    "enquiryPeriod": {
      "startDate": "2018-03-13T14:17:01.779556+02:00",
      "endDate": "2018-03-26T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2018-03-26T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "72f943f337ff4470acaa2e958316ecc3",
    "eligibilityCriteria_ru": "Участником электронного аукциона, предметом продажи на которых являются права требования по кредитным договорам и договорам обеспечения, не может быть пользователь, являющийся заёмщиком (должником относительно банка) и\\или поручителем (имущественным поручителем) по таким кредитным договорам и/или договорам обеспечения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2018-03-13T14:17:01.779958+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2018-03-13T14:17:01.780009+02:00",
        "id": "1fb6399b2dcb41cfaac9635a155aa3eb"
      }
    ],
    "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-03-13T14:17:01.782162+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "Учасником електронного аукціону, предметом продажу на яких є права вимоги за кредитними договорами та договорами забезпечення, не може бути користувач, який є позичальником (боржником відносно банку) та/або поручителем (майновим поручителем) за такими кредитними договорами та/або договорами забезпечення.",
    "tenderPeriod": {
      "startDate": "2018-03-13T14:17:01.779556+02:00",
      "endDate": "2018-03-26T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2018-03-27T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2018-03-13T14:17:01.779556+02: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": "2a4f2e4d5626482d85fbd1118d80489a",
        "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/72f943f337ff4470acaa2e958316ecc3 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-2018-03-13-000001",
    "enquiryPeriod": {
      "startDate": "2018-03-13T14:17:01.779556+02:00",
      "endDate": "2018-03-26T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2018-03-26T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "72f943f337ff4470acaa2e958316ecc3",
    "eligibilityCriteria_ru": "Участником электронного аукциона, предметом продажи на которых являются права требования по кредитным договорам и договорам обеспечения, не может быть пользователь, являющийся заёмщиком (должником относительно банка) и\\или поручителем (имущественным поручителем) по таким кредитным договорам и/или договорам обеспечения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2018-03-13T14:17:01.779958+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2018-03-13T14:17:01.780009+02:00",
        "id": "1fb6399b2dcb41cfaac9635a155aa3eb"
      }
    ],
    "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-03-13T14:17:01.782162+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "Учасником електронного аукціону, предметом продажу на яких є права вимоги за кредитними договорами та договорами забезпечення, не може бути користувач, який є позичальником (боржником відносно банку) та/або поручителем (майновим поручителем) за такими кредитними договорами та/або договорами забезпечення.",
    "tenderPeriod": {
      "startDate": "2018-03-13T14:17:01.779556+02:00",
      "endDate": "2018-03-26T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2018-03-27T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2018-03-13T14:17:01.779556+02: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": "2a4f2e4d5626482d85fbd1118d80489a",
        "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=",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.3/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.3/auctions/72f943f337ff4470acaa2e958316ecc3/documents?acc_token=58a3a8eb4997408aa23bfbd8c0828132 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 416
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/82b5347cbcd8420da4fa8155f52d8c33?KeyID=f56b2602&Signature=DI78x3wZ%2FeEltUnqei140K%2FZ6DUYE8Eshz6N8CUYZwt3TIdxRWXZSI%2Bu5DskuppwTDtuP4Hv1ZqtkmBCHHDGCQ%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/72f943f337ff4470acaa2e958316ecc3/documents/a3ff83aabb11426cb625ba1fc789f9da

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/82b5347cbcd8420da4fa8155f52d8c33?KeyID=f56b2602&Signature=6jXdDumL0qh7xmraaAwMMXwmOu%252BSQhNLFrESI73hrXlW71WZFCRiByzNcgzxVZoO34Pv5hZUouojXq2BTujHDw%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:01.840534+02:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2018-03-13T14:17:01.840556+02:00",
    "id": "a3ff83aabb11426cb625ba1fc789f9da"
  }
}

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/72f943f337ff4470acaa2e958316ecc3/documents/a3ff83aabb11426cb625ba1fc789f9da 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/82b5347cbcd8420da4fa8155f52d8c33?KeyID=f56b2602&Signature=6jXdDumL0qh7xmraaAwMMXwmOu%252BSQhNLFrESI73hrXlW71WZFCRiByzNcgzxVZoO34Pv5hZUouojXq2BTujHDw%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:01.840534+02:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2018-03-13T14:17:01.840556+02:00",
    "id": "a3ff83aabb11426cb625ba1fc789f9da"
  }
}

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

POST /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/documents?acc_token=58a3a8eb4997408aa23bfbd8c0828132 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/fe95cac4fb9245ca94952cd6dab9c1dd?KeyID=f56b2602&Signature=nL%2BRDl8iuZdIkQiUrxm1biuIC6IZJvaH20wzrV1NC9hUj%2BgG21iOcLoVooBnnQn1YI1u2FSDGshpXfEPj7PtBw%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/72f943f337ff4470acaa2e958316ecc3/documents/0bec9452f8f94abdb7858106369b08ff

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/fe95cac4fb9245ca94952cd6dab9c1dd?KeyID=f56b2602&Signature=4EDae%2FYL5XeuhCjRAxWxhR7OpWNcE5eo9tD4GrdzssL3%252BT2OIJHf6gcYdVg%252Bm3R2VOsDvztgBEUL2h9VrKAXBg%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:01.893597+02:00",
    "dateModified": "2018-03-13T14:17:01.893617+02:00",
    "id": "0bec9452f8f94abdb7858106369b08ff"
  }
}

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

GET /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/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": "2018-03-13T14:17:01.779958+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-03-13T14:17:01.780009+02:00",
      "id": "1fb6399b2dcb41cfaac9635a155aa3eb"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/82b5347cbcd8420da4fa8155f52d8c33?KeyID=f56b2602&Signature=6jXdDumL0qh7xmraaAwMMXwmOu%252BSQhNLFrESI73hrXlW71WZFCRiByzNcgzxVZoO34Pv5hZUouojXq2BTujHDw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:01.840534+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-03-13T14:17:01.840556+02:00",
      "id": "a3ff83aabb11426cb625ba1fc789f9da"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/fe95cac4fb9245ca94952cd6dab9c1dd?KeyID=f56b2602&Signature=4EDae%2FYL5XeuhCjRAxWxhR7OpWNcE5eo9tD4GrdzssL3%252BT2OIJHf6gcYdVg%252Bm3R2VOsDvztgBEUL2h9VrKAXBg%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:01.893597+02:00",
      "dateModified": "2018-03-13T14:17:01.893617+02:00",
      "id": "0bec9452f8f94abdb7858106369b08ff"
    }
  ]
}

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

PUT /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/documents/0bec9452f8f94abdb7858106369b08ff?acc_token=58a3a8eb4997408aa23bfbd8c0828132 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/c52728980a45403990aef5364bb470c2?KeyID=f56b2602&Signature=HoKuGygM5xK2YBOMhrTnJfaeiEOSBj90R1JdRIgA3ETNbMjyNmXY9RrafyGyo3ECSjf%2FKtO4RCTud1Ni3SQxDA%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/c52728980a45403990aef5364bb470c2?KeyID=f56b2602&Signature=4bHQVlGZpSbCWdHMlGxiJIoIdtV9gT6s2h45MMC83X4ZBc%2FPx8Kov7brp4yaZdsagUwsdwOVxboiaLlBJ9kPBw%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:01.893597+02:00",
    "dateModified": "2018-03-13T14:17:01.945397+02:00",
    "id": "0bec9452f8f94abdb7858106369b08ff"
  }
}

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

GET /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/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": "2018-03-13T14:17:01.779958+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-03-13T14:17:01.780009+02:00",
      "id": "1fb6399b2dcb41cfaac9635a155aa3eb"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/82b5347cbcd8420da4fa8155f52d8c33?KeyID=f56b2602&Signature=6jXdDumL0qh7xmraaAwMMXwmOu%252BSQhNLFrESI73hrXlW71WZFCRiByzNcgzxVZoO34Pv5hZUouojXq2BTujHDw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:01.840534+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-03-13T14:17:01.840556+02:00",
      "id": "a3ff83aabb11426cb625ba1fc789f9da"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/c52728980a45403990aef5364bb470c2?KeyID=f56b2602&Signature=4bHQVlGZpSbCWdHMlGxiJIoIdtV9gT6s2h45MMC83X4ZBc%2FPx8Kov7brp4yaZdsagUwsdwOVxboiaLlBJ9kPBw%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:01.893597+02:00",
      "dateModified": "2018-03-13T14:17:01.945397+02:00",
      "id": "0bec9452f8f94abdb7858106369b08ff"
    }
  ]
}

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/0bbf22e936f24d158f6d695b84b2de2f/documents?acc_token=2b1b3d8fd6be4827908b19fdf46323d7 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/f71e2ae36b204213be734207038be98f?KeyID=e578eecc&Signature=kHaVqwKfAY4OKhX5I4bgut2noUdDfJzdzmv0cj4hWTtu2fwCE7rpb8j9zPPd3t0K5BW8ElC4r2%2BJ5Mx1lwfEBQ%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/0bbf22e936f24d158f6d695b84b2de2f/documents/f8d934e325d444c79d69e5a312d6b44d

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f71e2ae36b204213be734207038be98f?KeyID=e578eecc&Signature=dTDhv644zx0urZeFe8%2F5t7ZiJC3VcdFv8B%252Bf%2FLxyAK7liqrSmMNXMope3hrj9Hn4MJ%252BPmGUG65lNNUCBsBYhCA%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:03.689220+02:00",
    "documentType": "illustration",
    "dateModified": "2018-03-13T14:17:03.689239+02:00",
    "id": "f8d934e325d444c79d69e5a312d6b44d"
  }
}

We can check whether illustration is uploaded.

GET /api/2.3/auctions/0bbf22e936f24d158f6d695b84b2de2f/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": "2018-03-13T14:17:03.353632+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-03-13T14:17:03.353673+02:00",
      "id": "33b3a7c855ec4b63bf221dc8bd4d3ec1"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/4af34c520df44c7781f6a526fdc2adb7?KeyID=e578eecc&Signature=YUkX7eiSr%252B2Z84m9kFFgCBr%2Fhyf10dc80HRbjQEhACK8Deh%2Fptc828AUsGttsQf7XPWYrRLUl9C7KdxS2r2QBg%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.546774+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-03-13T14:17:03.546793+02:00",
      "id": "96d79d45b88240f49fd044b0a9127472"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cb9db16b829642f18d388d5176d5c8e2?KeyID=e578eecc&Signature=DFWXQjyz41gOggupdgTs7MuX6FD6YYMZvtKMjGGJMJHqlKYwZH0jNteL%2FQkPklEahzMrdSRHJpYPOMRH%252BZeQBA%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.589862+02:00",
      "dateModified": "2018-03-13T14:17:03.640224+02:00",
      "id": "c957cd4a71e04e20a88bade4ab8040ca"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f71e2ae36b204213be734207038be98f?KeyID=e578eecc&Signature=dTDhv644zx0urZeFe8%2F5t7ZiJC3VcdFv8B%252Bf%2FLxyAK7liqrSmMNXMope3hrj9Hn4MJ%252BPmGUG65lNNUCBsBYhCA%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.689220+02:00",
      "documentType": "illustration",
      "dateModified": "2018-03-13T14:17:03.689239+02:00",
      "id": "f8d934e325d444c79d69e5a312d6b44d"
    }
  ]
}

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

POST /api/2.3/auctions/0bbf22e936f24d158f6d695b84b2de2f/documents?acc_token=2b1b3d8fd6be4827908b19fdf46323d7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 432
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/173103c9c3bc4a25b2b6bacc9e865e2c?KeyID=e578eecc&Signature=X7qHlXnvUX7xYMaCXKhZTZoiExxclc5L6au70hd6tdMdWwrUs6lWJ8%2FLpH%2BJw0turFVn9tUhB1euDnDA98GeAQ%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/0bbf22e936f24d158f6d695b84b2de2f/documents/4de8c3f245db45bdb378b07749fd28c2

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/173103c9c3bc4a25b2b6bacc9e865e2c?KeyID=e578eecc&Signature=9%2Fe6BkwhMDS6bF4XIQhRDfuPoRXpKbJIFWixjkltzsi75o3G7CgvVUfcvM7K9G3xMwUSaUC5AbNqs35ZF68OCA%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:03.739578+02:00",
    "documentType": "illustration",
    "dateModified": "2018-03-13T14:17:03.739603+02:00",
    "id": "4de8c3f245db45bdb378b07749fd28c2"
  }
}

Add third illustration:

POST /api/2.3/auctions/0bbf22e936f24d158f6d695b84b2de2f/documents?acc_token=2b1b3d8fd6be4827908b19fdf46323d7 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/3f37699d5d5245b2a5bfdbd38ce8b6a4?KeyID=e578eecc&Signature=UIe1TJKWpjHXf5Cp72FbJ697vLlGgdWGikCGFsN58IgXOsmNRBjBOymQrKCGDypoOwjs6w5gWXK4dWRc%2Fb3hAg%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/0bbf22e936f24d158f6d695b84b2de2f/documents/049a1bd33dad4f0884051e12040987ed

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/3f37699d5d5245b2a5bfdbd38ce8b6a4?KeyID=e578eecc&Signature=HchmMKL9tE6GTUR9nX2kLsyElIEwKKK4DHFFTBD445eV0MmVlY6w3Hx2IF9N7loIZQwT9cBmQ4QKCVSMYqjtBw%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:03.782536+02:00",
    "documentType": "illustration",
    "dateModified": "2018-03-13T14:17:03.782568+02:00",
    "id": "049a1bd33dad4f0884051e12040987ed"
  }
}

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/0bbf22e936f24d158f6d695b84b2de2f/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": "2018-03-13T14:17:03.353632+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2018-03-13T14:17:03.353673+02:00",
      "id": "33b3a7c855ec4b63bf221dc8bd4d3ec1"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/4af34c520df44c7781f6a526fdc2adb7?KeyID=e578eecc&Signature=YUkX7eiSr%252B2Z84m9kFFgCBr%2Fhyf10dc80HRbjQEhACK8Deh%2Fptc828AUsGttsQf7XPWYrRLUl9C7KdxS2r2QBg%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.546774+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2018-03-13T14:17:03.546793+02:00",
      "id": "96d79d45b88240f49fd044b0a9127472"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/cb9db16b829642f18d388d5176d5c8e2?KeyID=e578eecc&Signature=DFWXQjyz41gOggupdgTs7MuX6FD6YYMZvtKMjGGJMJHqlKYwZH0jNteL%2FQkPklEahzMrdSRHJpYPOMRH%252BZeQBA%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.589862+02:00",
      "dateModified": "2018-03-13T14:17:03.640224+02:00",
      "id": "c957cd4a71e04e20a88bade4ab8040ca"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f71e2ae36b204213be734207038be98f?KeyID=e578eecc&Signature=dTDhv644zx0urZeFe8%2F5t7ZiJC3VcdFv8B%252Bf%2FLxyAK7liqrSmMNXMope3hrj9Hn4MJ%252BPmGUG65lNNUCBsBYhCA%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.689220+02:00",
      "documentType": "illustration",
      "dateModified": "2018-03-13T14:17:03.689239+02:00",
      "id": "f8d934e325d444c79d69e5a312d6b44d"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/173103c9c3bc4a25b2b6bacc9e865e2c?KeyID=e578eecc&Signature=9%2Fe6BkwhMDS6bF4XIQhRDfuPoRXpKbJIFWixjkltzsi75o3G7CgvVUfcvM7K9G3xMwUSaUC5AbNqs35ZF68OCA%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.739578+02:00",
      "documentType": "illustration",
      "dateModified": "2018-03-13T14:17:03.739603+02:00",
      "id": "4de8c3f245db45bdb378b07749fd28c2"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/3f37699d5d5245b2a5bfdbd38ce8b6a4?KeyID=e578eecc&Signature=HchmMKL9tE6GTUR9nX2kLsyElIEwKKK4DHFFTBD445eV0MmVlY6w3Hx2IF9N7loIZQwT9cBmQ4QKCVSMYqjtBw%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:03.782536+02:00",
      "documentType": "illustration",
      "dateModified": "2018-03-13T14:17:03.782568+02:00",
      "id": "049a1bd33dad4f0884051e12040987ed"
    }
  ]
}

Adding virtual data room

Organizer can add URL for virtual data room:

POST /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/documents?acc_token=58a3a8eb4997408aa23bfbd8c0828132 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/72f943f337ff4470acaa2e958316ecc3/documents/a88aed3db33e4c6c9e8596671f09f8f8

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:02.002138+02:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2018-03-13T14:17:02.002164+02:00",
    "id": "a88aed3db33e4c6c9e8596671f09f8f8"
  }
}

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/72f943f337ff4470acaa2e958316ecc3/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/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e

{
  "access": {
    "token": "f1eb099213b94ce086c3241560a4fb67"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2018-03-13T14:17:02.052381+02: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": "75657b393358497898e6a1e531b7362e"
  }
}

And activate a bid:

PATCH /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e?acc_token=f1eb099213b94ce086c3241560a4fb67 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/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e/documents?acc_token=f1eb099213b94ce086c3241560a4fb67 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/83c521a325054f42a43df4954ba6d0f4?KeyID=f56b2602&Signature=78Nugq9jue%2Bceo%2FNL6brlw9vYBAJIqn04piZcS77010xKTmMNFo4%2BBMPa6MiwTUuHNusvQckyHoY8vs4l0rPAQ%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/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e/documents/43ef1e0dea7f4cfb9109c02810a55a1e

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e/documents/43ef1e0dea7f4cfb9109c02810a55a1e?download=83c521a325054f42a43df4954ba6d0f4",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2018-03-13T14:17:02.131195+02:00",
    "documentType": "financialLicense",
    "dateModified": "2018-03-13T14:17:02.131215+02:00",
    "id": "43ef1e0dea7f4cfb9109c02810a55a1e"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e/documents?acc_token=f1eb099213b94ce086c3241560a4fb67 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/72f943f337ff4470acaa2e958316ecc3/bids/75657b393358497898e6a1e531b7362e/documents/43ef1e0dea7f4cfb9109c02810a55a1e?download=83c521a325054f42a43df4954ba6d0f4",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2018-03-13T14:17:02.131195+02:00",
      "documentType": "financialLicense",
      "dateModified": "2018-03-13T14:17:02.131215+02:00",
      "id": "43ef1e0dea7f4cfb9109c02810a55a1e"
    }
  ]
}

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

POST /api/2.3/auctions/72f943f337ff4470acaa2e958316ecc3/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/72f943f337ff4470acaa2e958316ecc3/bids/6fa00c038beb4a1a91680b6d48cb0211

{
  "access": {
    "token": "259f1262f16c4899b9d6862743424f63"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2018-03-13T14:17:02.201488+02: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": "6fa00c038beb4a1a91680b6d48cb0211"
  }
}