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-06-23"
    },
    "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/acae3ff4a40b4c859542dbb5b0cbe6e5

{
  "access": {
    "token": "c9f3669442874ba6a12a69847085e82b"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-06-09-000001",
    "enquiryPeriod": {
      "startDate": "2017-06-09T15:08:59.135074+03:00",
      "endDate": "2017-06-22T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-06-22T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "acae3ff4a40b4c859542dbb5b0cbe6e5",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-06-09T15:08:59.135396+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-06-09T15:08:59.135421+03:00",
        "id": "183532e1e80440b18ab0a2d30bc42552"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-06-09T15:08:59.139779+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-06-09T15:08:59.135074+03:00",
      "endDate": "2017-06-22T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-06-23T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-06-09T15:08:59.135074+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": "e098f0afc4314a3786faffa69903bc1f",
        "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/acae3ff4a40b4c859542dbb5b0cbe6e5 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-06-09-000001",
    "enquiryPeriod": {
      "startDate": "2017-06-09T15:08:59.135074+03:00",
      "endDate": "2017-06-22T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-06-22T23:59:50+03:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "acae3ff4a40b4c859542dbb5b0cbe6e5",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-06-09T15:08:59.135396+03:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-06-09T15:08:59.135421+03:00",
        "id": "183532e1e80440b18ab0a2d30bc42552"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-06-09T15:08:59.139779+03:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-06-09T15:08:59.135074+03:00",
      "endDate": "2017-06-22T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-06-23T00:00:00+03:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-06-09T15:08:59.135074+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": "e098f0afc4314a3786faffa69903bc1f",
        "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-06-09T15%3A08%3A59.139779%2B03%3A00",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions?offset=2017-06-09T15%3A08%3A59.139779%2B03%3A00",
    "offset": "2017-06-09T15:08:59.139779+03:00"
  },
  "data": [
    {
      "id": "acae3ff4a40b4c859542dbb5b0cbe6e5",
      "dateModified": "2017-06-09T15:08:59.139779+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/acae3ff4a40b4c859542dbb5b0cbe6e5/documents?acc_token=c9f3669442874ba6a12a69847085e82b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 418
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/0cd2dc79560f4e6a891d2aba2826a143?KeyID=161d9473&Signature=MtdwQKjkLajRNjTsQ%2B9N0rm1FYlq3UITm%2Bl2f7%2Bsa8SWY4dCR17yRrXx%2FMByeSfzsM5w3BAqO5SQzpOiZQjuCw%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/acae3ff4a40b4c859542dbb5b0cbe6e5/documents/7b1c790f36e5455dbaece30b9be45da3

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0cd2dc79560f4e6a891d2aba2826a143?KeyID=161d9473&Signature=RVLTvRz6Im5y8jxCMNmEul1vMbs9g4QQQAfzbzSCvBcq4cdNKsT%2F4Ln7WJwNyOyYPZcbkQf2yO4ta7SsyjA4DQ%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.287837+03:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2017-06-09T15:08:59.287859+03:00",
    "id": "7b1c790f36e5455dbaece30b9be45da3"
  }
}

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/acae3ff4a40b4c859542dbb5b0cbe6e5/documents/7b1c790f36e5455dbaece30b9be45da3 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/0cd2dc79560f4e6a891d2aba2826a143?KeyID=161d9473&Signature=RVLTvRz6Im5y8jxCMNmEul1vMbs9g4QQQAfzbzSCvBcq4cdNKsT%2F4Ln7WJwNyOyYPZcbkQf2yO4ta7SsyjA4DQ%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.287837+03:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2017-06-09T15:08:59.287859+03:00",
    "id": "7b1c790f36e5455dbaece30b9be45da3"
  }
}

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

POST /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/documents?acc_token=c9f3669442874ba6a12a69847085e82b 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/85c43996ded74d28954602f916aaf30b?KeyID=161d9473&Signature=Y8tPCeQx5yYjegwEWWjV5u9z%2BMHMEr23zkR7Da1x3XMaXMSKWIf%2FVBGcV4O8EaGAc7DofdBs2M6kRqWgVzlQDQ%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/acae3ff4a40b4c859542dbb5b0cbe6e5/documents/65e0e527509049eab2c2fb86b81bff0f

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/85c43996ded74d28954602f916aaf30b?KeyID=161d9473&Signature=fiSoJ5%252B917G%2FYFd8Z97MKucoXcxsUe0Fx04eKNC0Q%2FuoEhfbdW%252BygcyOb50s4xwKf%2FAR%2FwpxyLczKAa%2F7YfmAA%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.339857+03:00",
    "dateModified": "2017-06-09T15:08:59.339878+03:00",
    "id": "65e0e527509049eab2c2fb86b81bff0f"
  }
}

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

GET /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/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-06-09T15:08:59.135396+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-06-09T15:08:59.135421+03:00",
      "id": "183532e1e80440b18ab0a2d30bc42552"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0cd2dc79560f4e6a891d2aba2826a143?KeyID=161d9473&Signature=RVLTvRz6Im5y8jxCMNmEul1vMbs9g4QQQAfzbzSCvBcq4cdNKsT%2F4Ln7WJwNyOyYPZcbkQf2yO4ta7SsyjA4DQ%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:08:59.287837+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-06-09T15:08:59.287859+03:00",
      "id": "7b1c790f36e5455dbaece30b9be45da3"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/85c43996ded74d28954602f916aaf30b?KeyID=161d9473&Signature=fiSoJ5%252B917G%2FYFd8Z97MKucoXcxsUe0Fx04eKNC0Q%2FuoEhfbdW%252BygcyOb50s4xwKf%2FAR%2FwpxyLczKAa%2F7YfmAA%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:08:59.339857+03:00",
      "dateModified": "2017-06-09T15:08:59.339878+03:00",
      "id": "65e0e527509049eab2c2fb86b81bff0f"
    }
  ]
}

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

PUT /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/documents/65e0e527509049eab2c2fb86b81bff0f?acc_token=c9f3669442874ba6a12a69847085e82b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 338
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/39c8ec8b9c464f56a91092a68b4371c3?KeyID=161d9473&Signature=7OQdZzvqzo2MXkP%2F2h1JQx4vCpL8DReYF%2FzO3Elxro6JHZczsY5dsPHspZLQgEuOxPKsJe70Hea234cCyAFkAQ%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/39c8ec8b9c464f56a91092a68b4371c3?KeyID=161d9473&Signature=miJhuUt4AGLmu6mS10QuuoLnY%2FUQkIqqUH4s%2FYiD%2FWI0Xb0O0%2Frh3%252BDWSu3ljj0z1IDKi2maGPD3X2z9RGpVAw%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.339857+03:00",
    "dateModified": "2017-06-09T15:08:59.387864+03:00",
    "id": "65e0e527509049eab2c2fb86b81bff0f"
  }
}

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

GET /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/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-06-09T15:08:59.135396+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-06-09T15:08:59.135421+03:00",
      "id": "183532e1e80440b18ab0a2d30bc42552"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/0cd2dc79560f4e6a891d2aba2826a143?KeyID=161d9473&Signature=RVLTvRz6Im5y8jxCMNmEul1vMbs9g4QQQAfzbzSCvBcq4cdNKsT%2F4Ln7WJwNyOyYPZcbkQf2yO4ta7SsyjA4DQ%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:08:59.287837+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-06-09T15:08:59.287859+03:00",
      "id": "7b1c790f36e5455dbaece30b9be45da3"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/39c8ec8b9c464f56a91092a68b4371c3?KeyID=161d9473&Signature=miJhuUt4AGLmu6mS10QuuoLnY%2FUQkIqqUH4s%2FYiD%2FWI0Xb0O0%2Frh3%252BDWSu3ljj0z1IDKi2maGPD3X2z9RGpVAw%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:08:59.339857+03:00",
      "dateModified": "2017-06-09T15:08:59.387864+03:00",
      "id": "65e0e527509049eab2c2fb86b81bff0f"
    }
  ]
}

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/92b74c258aa344d2810c14e9946728d0/documents?acc_token=0be9719321be4aa699f77ec6cff48e1a HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 428
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/129d7bf69629472ab28d997f6834bf3f?KeyID=dd67d497&Signature=XKoh8WxRq%2BYra32Qoek0Oj1aoqnL0bkS5g7aWIn56eo0t4OSCmLu13nKEuoXPMIZg7gOxO2lERCjZuoZRethDg%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/92b74c258aa344d2810c14e9946728d0/documents/ed2c1de60d614f27baec5f0fc6902179

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/129d7bf69629472ab28d997f6834bf3f?KeyID=dd67d497&Signature=kvVYBa6I42jH7bWhD6fhR3bLky93icp7EoBIm9rdXMroQsQVD4RwsPoytzvR5%252BWORLnc568X4alFuYZkPUezBg%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:09:01.076450+03:00",
    "documentType": "illustration",
    "dateModified": "2017-06-09T15:09:01.076471+03:00",
    "id": "ed2c1de60d614f27baec5f0fc6902179"
  }
}

We can check whether illustration is uploaded.

GET /api/2.3/auctions/92b74c258aa344d2810c14e9946728d0/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-06-09T15:09:00.525896+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-06-09T15:09:00.525926+03:00",
      "id": "76b99275e7794bb7a98fe5672915d44d"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/da6b8ce61e034c44980b7990366402ad?KeyID=dd67d497&Signature=JvA7XMqmBtKn0R5Os43yBMiDC2AR%252BFNYsXl5L%252BpKoEGfZ0bOKIGe0fo1f6sLw4Ij9cTnL39qbC8vDTLi4sfvBA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:00.919847+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-06-09T15:09:00.919868+03:00",
      "id": "5c778078638b475b94f511fa79dd63ef"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/d96dfd46bf63487d83c2ca7337da068d?KeyID=dd67d497&Signature=cYNza9MM%2FjD97HV2HrrEoj2XI1NI3SiPqTIrie9EaHgjb2Aqod0fWcxHX4HjxsECUHL4Bc25TCPy4tRx7BtlDw%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:00.968887+03:00",
      "dateModified": "2017-06-09T15:09:01.021906+03:00",
      "id": "fade6817e87a452cbb6694eee57eb84c"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/129d7bf69629472ab28d997f6834bf3f?KeyID=dd67d497&Signature=kvVYBa6I42jH7bWhD6fhR3bLky93icp7EoBIm9rdXMroQsQVD4RwsPoytzvR5%252BWORLnc568X4alFuYZkPUezBg%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:01.076450+03:00",
      "documentType": "illustration",
      "dateModified": "2017-06-09T15:09:01.076471+03:00",
      "id": "ed2c1de60d614f27baec5f0fc6902179"
    }
  ]
}

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

POST /api/2.3/auctions/92b74c258aa344d2810c14e9946728d0/documents?acc_token=0be9719321be4aa699f77ec6cff48e1a HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 438
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/f8992c78a98f41eb9cf2821cd093628d?KeyID=dd67d497&Signature=%2FHGhtJDIcFJN3Ri%2FQG3vUucS%2Bt6oQL%2B9tvnI1rxKqStucTLbMMps9uiRW2i22%2FvrHlYLSFPu7q0jg119BCCFDg%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/92b74c258aa344d2810c14e9946728d0/documents/713bdadb020c451ea3fa09fdf97c1db2

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f8992c78a98f41eb9cf2821cd093628d?KeyID=dd67d497&Signature=j3hydElv3bW%2FYe6%2FPNDu%2F4zhLmSEJkF%252BO6HrGJJG37WfmEDmZUp2YGQ2BhOWeNzZi2TtRNqx5yyzcs6iNYHLDg%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:09:01.132210+03:00",
    "documentType": "illustration",
    "dateModified": "2017-06-09T15:09:01.132232+03:00",
    "id": "713bdadb020c451ea3fa09fdf97c1db2"
  }
}

Add third illustration:

POST /api/2.3/auctions/92b74c258aa344d2810c14e9946728d0/documents?acc_token=0be9719321be4aa699f77ec6cff48e1a 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": "Third illustration description",
    "title": "third_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/35e69bb2b91b4823927172e091256ae3?KeyID=dd67d497&Signature=rDRLDctebnHbWrg88A%2FgFU14IXUJavjd64WbfFNrfPQfBPya88NXMh5ROlzOYyL3sPfbpglnBdyeV7G7hmr9Cg%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/92b74c258aa344d2810c14e9946728d0/documents/511fcd289c4343b690be27ad4d0a29c8

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/35e69bb2b91b4823927172e091256ae3?KeyID=dd67d497&Signature=5qAShEjK%252BkcI3W8WO%252BXdMF96UP5JXYAKsdYdfa8xt9aXKcwmik6tsVqc1zizcAZCgEla9Iu7yYqCBJ7Xp4ZqCw%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:09:01.179319+03:00",
    "documentType": "illustration",
    "dateModified": "2017-06-09T15:09:01.179340+03:00",
    "id": "511fcd289c4343b690be27ad4d0a29c8"
  }
}

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/92b74c258aa344d2810c14e9946728d0/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-06-09T15:09:00.525896+03:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-06-09T15:09:00.525926+03:00",
      "id": "76b99275e7794bb7a98fe5672915d44d"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/da6b8ce61e034c44980b7990366402ad?KeyID=dd67d497&Signature=JvA7XMqmBtKn0R5Os43yBMiDC2AR%252BFNYsXl5L%252BpKoEGfZ0bOKIGe0fo1f6sLw4Ij9cTnL39qbC8vDTLi4sfvBA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:00.919847+03:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-06-09T15:09:00.919868+03:00",
      "id": "5c778078638b475b94f511fa79dd63ef"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/d96dfd46bf63487d83c2ca7337da068d?KeyID=dd67d497&Signature=cYNza9MM%2FjD97HV2HrrEoj2XI1NI3SiPqTIrie9EaHgjb2Aqod0fWcxHX4HjxsECUHL4Bc25TCPy4tRx7BtlDw%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:00.968887+03:00",
      "dateModified": "2017-06-09T15:09:01.021906+03:00",
      "id": "fade6817e87a452cbb6694eee57eb84c"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/129d7bf69629472ab28d997f6834bf3f?KeyID=dd67d497&Signature=kvVYBa6I42jH7bWhD6fhR3bLky93icp7EoBIm9rdXMroQsQVD4RwsPoytzvR5%252BWORLnc568X4alFuYZkPUezBg%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:01.076450+03:00",
      "documentType": "illustration",
      "dateModified": "2017-06-09T15:09:01.076471+03:00",
      "id": "ed2c1de60d614f27baec5f0fc6902179"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f8992c78a98f41eb9cf2821cd093628d?KeyID=dd67d497&Signature=j3hydElv3bW%2FYe6%2FPNDu%2F4zhLmSEJkF%252BO6HrGJJG37WfmEDmZUp2YGQ2BhOWeNzZi2TtRNqx5yyzcs6iNYHLDg%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:01.132210+03:00",
      "documentType": "illustration",
      "dateModified": "2017-06-09T15:09:01.132232+03:00",
      "id": "713bdadb020c451ea3fa09fdf97c1db2"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/35e69bb2b91b4823927172e091256ae3?KeyID=dd67d497&Signature=5qAShEjK%252BkcI3W8WO%252BXdMF96UP5JXYAKsdYdfa8xt9aXKcwmik6tsVqc1zizcAZCgEla9Iu7yYqCBJ7Xp4ZqCw%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:09:01.179319+03:00",
      "documentType": "illustration",
      "dateModified": "2017-06-09T15:09:01.179340+03:00",
      "id": "511fcd289c4343b690be27ad4d0a29c8"
    }
  ]
}

Adding virtual data room

Organizer can add URL for virtual data room:

POST /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/documents?acc_token=c9f3669442874ba6a12a69847085e82b 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/acae3ff4a40b4c859542dbb5b0cbe6e5/documents/eb1381d44db34506aea55ce00146d645

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.448695+03:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2017-06-09T15:08:59.448716+03:00",
    "id": "eb1381d44db34506aea55ce00146d645"
  }
}

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/acae3ff4a40b4c859542dbb5b0cbe6e5/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/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87

{
  "access": {
    "token": "b1ea0e93b02c4c498d402e238b2e3497"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-09T15:08:59.494842+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": "908d170cb1c94b4980848ce6a2102b87"
  }
}

And activate a bid:

PATCH /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87?acc_token=b1ea0e93b02c4c498d402e238b2e3497 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/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87/documents?acc_token=b1ea0e93b02c4c498d402e238b2e3497 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 377
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/e4de5f0adc954a8e9737e0c9614994e8?KeyID=161d9473&Signature=1WY%2FjU1zunIh4scJHpxp7M2d%2BFC6nnfmC39PHbMoIi5IxVcFlafUtVR6DAmPDksNXC1hKr%2FfjgIllgd7I3liCg%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/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87/documents/9138d4f80d594fdf9dc7c8dfe983671f

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87/documents/9138d4f80d594fdf9dc7c8dfe983671f?download=e4de5f0adc954a8e9737e0c9614994e8",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-09T15:08:59.573984+03:00",
    "documentType": "financialLicense",
    "dateModified": "2017-06-09T15:08:59.574019+03:00",
    "id": "9138d4f80d594fdf9dc7c8dfe983671f"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87/documents?acc_token=b1ea0e93b02c4c498d402e238b2e3497 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/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/908d170cb1c94b4980848ce6a2102b87/documents/9138d4f80d594fdf9dc7c8dfe983671f?download=e4de5f0adc954a8e9737e0c9614994e8",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-09T15:08:59.573984+03:00",
      "documentType": "financialLicense",
      "dateModified": "2017-06-09T15:08:59.574019+03:00",
      "id": "9138d4f80d594fdf9dc7c8dfe983671f"
    }
  ]
}

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

POST /api/2.3/auctions/acae3ff4a40b4c859542dbb5b0cbe6e5/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/acae3ff4a40b4c859542dbb5b0cbe6e5/bids/6bba5992e8dd4aee98d4f373d3d41c45

{
  "access": {
    "token": "c4dc739dbfb24b42a9715c1c93b916d0"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-09T15:08:59.651109+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": "6bba5992e8dd4aee98d4f373d3d41c45"
  }
}