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: 2153
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "auctionPeriod": {
      "startDate": "2017-02-15"
    },
    "tenderAttempts": 1,
    "procurementMethodType": "dgfFinancialAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "dgfDecisionDate": "2016-11-17",
    "dgfID": "219560",
    "dgfDecisionID": "219560",
    "procurementMethodDetails": "quick, accelerator=1440",
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "id": "04114000-0",
          "description": "Земельні ділянки"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "04114000-0",
          "version": "latest",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "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/7c4b1c5e9c624bffa4feb0d69248e311

{
  "access": {
    "token": "f55e1d84bebf44d899324ea2db4fc671"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-02-01-000001",
    "enquiryPeriod": {
      "startDate": "2017-02-01T13:22:17.671396+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-02-14T23:59:50+02:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "7c4b1c5e9c624bffa4feb0d69248e311",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-02-01T13:22:17.671887+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-02-01T13:22:17.671930+02:00",
        "id": "e62b5688a9a0478191b1eb8dad288ed7"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-02-01T13:22:17.678754+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-02-01T13:22:17.671396+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-02-15T00:00:00+02:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-02-01T13:22:17.671396+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "04114000-0"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "041",
          "version": "001",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "id": "2f21a2129dd14629984fca9013b16424",
        "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/7c4b1c5e9c624bffa4feb0d69248e311 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-02-01-000001",
    "enquiryPeriod": {
      "startDate": "2017-02-01T13:22:17.671396+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-02-14T23:59:50+02:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "7c4b1c5e9c624bffa4feb0d69248e311",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-02-01T13:22:17.671887+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-02-01T13:22:17.671930+02:00",
        "id": "e62b5688a9a0478191b1eb8dad288ed7"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-02-01T13:22:17.678754+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-02-01T13:22:17.671396+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-02-15T00:00:00+02:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-02-01T13:22:17.671396+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "04114000-0"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "041",
          "version": "001",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "id": "2f21a2129dd14629984fca9013b16424",
        "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-02-01T13%3A22%3A17.678754%2B02%3A00",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions?offset=2017-02-01T13%3A22%3A17.678754%2B02%3A00",
    "offset": "2017-02-01T13:22:17.678754+02:00"
  },
  "data": [
    {
      "id": "7c4b1c5e9c624bffa4feb0d69248e311",
      "dateModified": "2017-02-01T13:22:17.678754+02: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/7c4b1c5e9c624bffa4feb0d69248e311/documents?acc_token=f55e1d84bebf44d899324ea2db4fc671 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/168e34b56cb646ee8450e9cdbb5cb84d?KeyID=0678eb99&Signature=vVuRrETPye43761R9aH3d292RkpPVoksqyKtCriafJqN%2BdxSJt5vPLhN8QvK15iFQRwtyMPakI8eAisG28HNBQ%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/7c4b1c5e9c624bffa4feb0d69248e311/documents/7697dfe7bbb142dda6ce306d70e75a9b

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/168e34b56cb646ee8450e9cdbb5cb84d?KeyID=0678eb99&Signature=lI8kxzS7AsjFS5O2fO0gdQshCcNwUxgrWmSwD7Csyak%2Fr44YOJGgrfTwPvDJdpEhNQM8JBFJTDLcIQ%2FmIvFWCA%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:17.868599+02:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2017-02-01T13:22:17.868627+02:00",
    "id": "7697dfe7bbb142dda6ce306d70e75a9b"
  }
}

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/7c4b1c5e9c624bffa4feb0d69248e311/documents/7697dfe7bbb142dda6ce306d70e75a9b 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/168e34b56cb646ee8450e9cdbb5cb84d?KeyID=0678eb99&Signature=lI8kxzS7AsjFS5O2fO0gdQshCcNwUxgrWmSwD7Csyak%2Fr44YOJGgrfTwPvDJdpEhNQM8JBFJTDLcIQ%2FmIvFWCA%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:17.868599+02:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2017-02-01T13:22:17.868627+02:00",
    "id": "7697dfe7bbb142dda6ce306d70e75a9b"
  }
}

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

POST /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/documents?acc_token=f55e1d84bebf44d899324ea2db4fc671 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/009c7d69a186420a9fa8f1962b57caab?KeyID=0678eb99&Signature=dy7J4hyQCb7FoACWexnKBPSnEpUgUHzuv2WbPjs75s1JBo7W61IyXNeN4tYvk2SStRFexpxvoLIA7S8%2Fq6cQAA%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/7c4b1c5e9c624bffa4feb0d69248e311/documents/3319fcecf8fd4ea28ad6c13841d54844

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/009c7d69a186420a9fa8f1962b57caab?KeyID=0678eb99&Signature=l3l%252BSorSU9fYTnJKMLNLhxmk5Tav7WB9w%252BKo1YcBBOvEe1cnla6I%2F3jWJvKhF4b%2FEtLcyP9k4QUzL9mIzyU6Dw%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:17.960618+02:00",
    "dateModified": "2017-02-01T13:22:17.960672+02:00",
    "id": "3319fcecf8fd4ea28ad6c13841d54844"
  }
}

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

GET /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/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-02-01T13:22:17.671887+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-02-01T13:22:17.671930+02:00",
      "id": "e62b5688a9a0478191b1eb8dad288ed7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/168e34b56cb646ee8450e9cdbb5cb84d?KeyID=0678eb99&Signature=lI8kxzS7AsjFS5O2fO0gdQshCcNwUxgrWmSwD7Csyak%2Fr44YOJGgrfTwPvDJdpEhNQM8JBFJTDLcIQ%2FmIvFWCA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:17.868599+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-02-01T13:22:17.868627+02:00",
      "id": "7697dfe7bbb142dda6ce306d70e75a9b"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/009c7d69a186420a9fa8f1962b57caab?KeyID=0678eb99&Signature=l3l%252BSorSU9fYTnJKMLNLhxmk5Tav7WB9w%252BKo1YcBBOvEe1cnla6I%2F3jWJvKhF4b%2FEtLcyP9k4QUzL9mIzyU6Dw%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:17.960618+02:00",
      "dateModified": "2017-02-01T13:22:17.960672+02:00",
      "id": "3319fcecf8fd4ea28ad6c13841d54844"
    }
  ]
}

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

PUT /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/documents/3319fcecf8fd4ea28ad6c13841d54844?acc_token=f55e1d84bebf44d899324ea2db4fc671 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/34db0d062e654d9fa8a09a5799297509?KeyID=0678eb99&Signature=8NCrfYqEL%2FF1nzEWh6%2Bs0Rvx2FeZ0VZ6mQWpUIOJpfuCpO3EtkfQOSSvBZLLUuc2uptvKYoqoeTCjL0QxAbsBQ%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/34db0d062e654d9fa8a09a5799297509?KeyID=0678eb99&Signature=XVVJU7VMAmqUketT67dq5O1cAWPWELe%252BvLaiCWX7psdiDCanYyfWlUt1e9sKmsR5FNmV5wzQCu5B1QNErDPnAA%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:17.960618+02:00",
    "dateModified": "2017-02-01T13:22:18.037356+02:00",
    "id": "3319fcecf8fd4ea28ad6c13841d54844"
  }
}

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

GET /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/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-02-01T13:22:17.671887+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-02-01T13:22:17.671930+02:00",
      "id": "e62b5688a9a0478191b1eb8dad288ed7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "technical specification",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/168e34b56cb646ee8450e9cdbb5cb84d?KeyID=0678eb99&Signature=lI8kxzS7AsjFS5O2fO0gdQshCcNwUxgrWmSwD7Csyak%2Fr44YOJGgrfTwPvDJdpEhNQM8JBFJTDLcIQ%2FmIvFWCA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:17.868599+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-02-01T13:22:17.868627+02:00",
      "id": "7697dfe7bbb142dda6ce306d70e75a9b"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/34db0d062e654d9fa8a09a5799297509?KeyID=0678eb99&Signature=XVVJU7VMAmqUketT67dq5O1cAWPWELe%252BvLaiCWX7psdiDCanYyfWlUt1e9sKmsR5FNmV5wzQCu5B1QNErDPnAA%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:17.960618+02:00",
      "dateModified": "2017-02-01T13:22:18.037356+02:00",
      "id": "3319fcecf8fd4ea28ad6c13841d54844"
    }
  ]
}

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/56c507ca68744c5f964933955043072a/documents?acc_token=2ac7aaf0d5b2429e9024f281f75c0eaf HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 430
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/706d73b92a65446199d1d0573963d601?KeyID=8f3407b6&Signature=KjHBSwz4JyFIRkvYmubAy0GZI2SHGsP1OtuXs56fmgnxov1RMk6Fxtj0LQzl1VpF8lg%2BzN5N%2FW8ypFmnr4QwDg%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/56c507ca68744c5f964933955043072a/documents/e7803c183b6e4ec9a45529d5b5896b21

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/706d73b92a65446199d1d0573963d601?KeyID=8f3407b6&Signature=AUG0Ux1M3qgW8e1mtYzVaHy55h1MSBWrP9V%2Fy9SbMmwnzRYTSU3f0FP%2FuW%2FmGCpZhDj4zfyx6Dh6bfp8ByQcAw%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:21.233533+02:00",
    "documentType": "illustration",
    "dateModified": "2017-02-01T13:22:21.233582+02:00",
    "id": "e7803c183b6e4ec9a45529d5b5896b21"
  }
}

We can check whether illustration is uploaded.

GET /api/2.3/auctions/56c507ca68744c5f964933955043072a/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-02-01T13:22:19.999323+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-02-01T13:22:19.999372+02:00",
      "id": "3136ee8064c24ef4ab8555d430927ebd"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f4f48d70db344310bf2a407d6f6dea95?KeyID=8f3407b6&Signature=xCrpwggqDZU87cDDCGMXMrX2rqIp3XcKD5%2FWi0t01noV%2FaZhV1xeZmzjAzlrLy5SQPcc%252BWv4sI9gN664KXnQBw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:20.587044+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-02-01T13:22:20.587093+02:00",
      "id": "d24959c19c6544039ba215721fc188d7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/72309f80c9c34b5bb4333834f1512188?KeyID=8f3407b6&Signature=g4SOcSX5%252BTz3HyoRG6Wanx2r2rYAQTBVH3WV8YJjY13WWQXIc%252BEHHuehiaCWFFq5TXCcpdcRdKvNzYwsHr4hDQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:20.734187+02:00",
      "dateModified": "2017-02-01T13:22:21.110477+02:00",
      "id": "91240c87090242658d9158df422f0656"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/706d73b92a65446199d1d0573963d601?KeyID=8f3407b6&Signature=AUG0Ux1M3qgW8e1mtYzVaHy55h1MSBWrP9V%2Fy9SbMmwnzRYTSU3f0FP%2FuW%2FmGCpZhDj4zfyx6Dh6bfp8ByQcAw%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:21.233533+02:00",
      "documentType": "illustration",
      "dateModified": "2017-02-01T13:22:21.233582+02:00",
      "id": "e7803c183b6e4ec9a45529d5b5896b21"
    }
  ]
}

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

POST /api/2.3/auctions/56c507ca68744c5f964933955043072a/documents?acc_token=2ac7aaf0d5b2429e9024f281f75c0eaf HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 430
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "title": "second_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/a5a96dd0cc6242f684a5ae7536838594?KeyID=8f3407b6&Signature=8%2FlcbzDABnNmIT0CyyXIuS73OLSsXSQym9Wg4IZxNDxnPtAVTGkBOAGn2AEwL4t0ZIwPMc2PUCpCwU7mwvPjDA%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/56c507ca68744c5f964933955043072a/documents/b954ae21ee9e422da03d1b3511c619e5

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/a5a96dd0cc6242f684a5ae7536838594?KeyID=8f3407b6&Signature=P66c7p7scu1I%2FrwS54p1o4TERQ%252BMhQOvWsegllG9S6OYkqh3oZI9CuRKHKETsG8pnh6xB9jP3QpfCHA0ihuYAA%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:21.382379+02:00",
    "documentType": "illustration",
    "dateModified": "2017-02-01T13:22:21.382428+02:00",
    "id": "b954ae21ee9e422da03d1b3511c619e5"
  }
}

Add third illustration:

POST /api/2.3/auctions/56c507ca68744c5f964933955043072a/documents?acc_token=2ac7aaf0d5b2429e9024f281f75c0eaf 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": "Third illustration description",
    "title": "third_illustration.jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/113b840ceb314f7e9755898dd04ca7a8?KeyID=8f3407b6&Signature=EkAj%2BeR6uirMFKEjwyYNB55CezxVgv3PdAgq4JGybaCKTkAFrPM5C%2BawGW3XMFEC9eByl4BBLcyYf6h8%2BVUEBQ%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/56c507ca68744c5f964933955043072a/documents/b7aeede0898a4fe294c15f145a7c0dac

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/113b840ceb314f7e9755898dd04ca7a8?KeyID=8f3407b6&Signature=BBEUcPxmB3wdQoG4I9xkkTXI7d2n8A5B7KjWzgD%2FG9CliAd%252BaL8Mf6TnQGOFJUBYGRDTHJuhSxoI%252BRWl0Qw%252BBQ%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:21.485198+02:00",
    "documentType": "illustration",
    "dateModified": "2017-02-01T13:22:21.485248+02:00",
    "id": "b7aeede0898a4fe294c15f145a7c0dac"
  }
}

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/56c507ca68744c5f964933955043072a/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-02-01T13:22:19.999323+02:00",
      "documentType": "x_dgfPlatformLegalDetails",
      "dateModified": "2017-02-01T13:22:19.999372+02:00",
      "id": "3136ee8064c24ef4ab8555d430927ebd"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/f4f48d70db344310bf2a407d6f6dea95?KeyID=8f3407b6&Signature=xCrpwggqDZU87cDDCGMXMrX2rqIp3XcKD5%2FWi0t01noV%2FaZhV1xeZmzjAzlrLy5SQPcc%252BWv4sI9gN664KXnQBw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:20.587044+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-02-01T13:22:20.587093+02:00",
      "id": "d24959c19c6544039ba215721fc188d7"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/72309f80c9c34b5bb4333834f1512188?KeyID=8f3407b6&Signature=g4SOcSX5%252BTz3HyoRG6Wanx2r2rYAQTBVH3WV8YJjY13WWQXIc%252BEHHuehiaCWFFq5TXCcpdcRdKvNzYwsHr4hDQ%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:20.734187+02:00",
      "dateModified": "2017-02-01T13:22:21.110477+02:00",
      "id": "91240c87090242658d9158df422f0656"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/706d73b92a65446199d1d0573963d601?KeyID=8f3407b6&Signature=AUG0Ux1M3qgW8e1mtYzVaHy55h1MSBWrP9V%2Fy9SbMmwnzRYTSU3f0FP%2FuW%2FmGCpZhDj4zfyx6Dh6bfp8ByQcAw%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:21.233533+02:00",
      "documentType": "illustration",
      "dateModified": "2017-02-01T13:22:21.233582+02:00",
      "id": "e7803c183b6e4ec9a45529d5b5896b21"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/a5a96dd0cc6242f684a5ae7536838594?KeyID=8f3407b6&Signature=P66c7p7scu1I%2FrwS54p1o4TERQ%252BMhQOvWsegllG9S6OYkqh3oZI9CuRKHKETsG8pnh6xB9jP3QpfCHA0ihuYAA%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:21.382379+02:00",
      "documentType": "illustration",
      "dateModified": "2017-02-01T13:22:21.382428+02:00",
      "id": "b954ae21ee9e422da03d1b3511c619e5"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/113b840ceb314f7e9755898dd04ca7a8?KeyID=8f3407b6&Signature=BBEUcPxmB3wdQoG4I9xkkTXI7d2n8A5B7KjWzgD%2FG9CliAd%252BaL8Mf6TnQGOFJUBYGRDTHJuhSxoI%252BRWl0Qw%252BBQ%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:21.485198+02:00",
      "documentType": "illustration",
      "dateModified": "2017-02-01T13:22:21.485248+02:00",
      "id": "b7aeede0898a4fe294c15f145a7c0dac"
    }
  ]
}

Adding virtual data room

Organizer can add URL for virtual data room:

POST /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/documents?acc_token=f55e1d84bebf44d899324ea2db4fc671 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/7c4b1c5e9c624bffa4feb0d69248e311/documents/ff638211c2684fb8a5559ba9526f1436

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:18.201012+02:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2017-02-01T13:22:18.201059+02:00",
    "id": "ff638211c2684fb8a5559ba9526f1436"
  }
}

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/7c4b1c5e9c624bffa4feb0d69248e311/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/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb

{
  "access": {
    "token": "e420d635d98a4b3dbef4334200c4ac2a"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-02-01T13:22:18.306627+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": "b331976164ee46689810aef6cdbe0adb"
  }
}

And activate a bid:

PATCH /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb?acc_token=e420d635d98a4b3dbef4334200c4ac2a 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/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb/documents?acc_token=e420d635d98a4b3dbef4334200c4ac2a 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/e8f72cbf21d84123a1d236ea60dcc72c?KeyID=0678eb99&Signature=Cixr144BgRI23%2B7%2F5H5euNQromUKsKPmaMlqnCMRTvpCfb1EfpdfbsjINE%2F8k0bw4TzHOWMOh0AX3PnIyqzhBA%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/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb/documents/5dd7b270cd8c4f51b9a016ea6b6528d8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb/documents/5dd7b270cd8c4f51b9a016ea6b6528d8?download=e8f72cbf21d84123a1d236ea60dcc72c",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2017-02-01T13:22:18.501453+02:00",
    "documentType": "financialLicense",
    "dateModified": "2017-02-01T13:22:18.501509+02:00",
    "id": "5dd7b270cd8c4f51b9a016ea6b6528d8"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb/documents?acc_token=e420d635d98a4b3dbef4334200c4ac2a 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/7c4b1c5e9c624bffa4feb0d69248e311/bids/b331976164ee46689810aef6cdbe0adb/documents/5dd7b270cd8c4f51b9a016ea6b6528d8?download=e8f72cbf21d84123a1d236ea60dcc72c",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2017-02-01T13:22:18.501453+02:00",
      "documentType": "financialLicense",
      "dateModified": "2017-02-01T13:22:18.501509+02:00",
      "id": "5dd7b270cd8c4f51b9a016ea6b6528d8"
    }
  ]
}

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

POST /api/2.3/auctions/7c4b1c5e9c624bffa4feb0d69248e311/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/7c4b1c5e9c624bffa4feb0d69248e311/bids/d5c5d779f21f481a977e9a93b0671d2e

{
  "access": {
    "token": "ddf921471f8a485e8db4feeb94393158"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-02-01T13:22:18.671130+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": "d5c5d779f21f481a977e9a93b0671d2e"
  }
}