Фін. туторіал

Туторіал для процедури dgfFinancialAssets - продаж права вимоги за кредитними договорами.

Створення аукціону

Створимо аукціон з мінімально допустимим (обовязковим для заповнення) набором даних:

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

{
  "data": {
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "procurementMethodDetails": "quick, accelerator=1440",
    "tenderAttempts": 1,
    "procurementMethodType": "dgfFinancialAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "dgfID": "219560",
    "auctionPeriod": {
      "startDate": "2017-12-14"
    },
    "items": [
      {
        "classification": {
          "scheme": "CPV",
          "id": "66113000-5",
          "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/73e1598288054eb98e8153ee9e69bb28

{
  "access": {
    "token": "6c03609dd6844e42bc1318fddf20c937"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-PS-2017-11-30-000001",
    "enquiryPeriod": {
      "startDate": "2017-11-30T16:56:23.942831+02:00",
      "endDate": "2017-12-13T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2017-12-13T23:59:50+02:00",
    "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": "м. Київ"
      }
    },
    "owner": "broker",
    "id": "73e1598288054eb98e8153ee9e69bb28",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-11-30T16:56:23.946137+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-11-30T16:56:23.942831+02:00",
      "endDate": "2017-12-13T23:59:50+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-12-14T00:00:00+02:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-11-30T16:56:23.942831+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "e16351a78632484e8756b1dea38e6201",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "highestCost"
  }
}

Успіх! Тепер ми бачимо, що новий об’єкт було створено. Код відповіді 201 та заголовок відповіді Location вказує місцерозташування створеного об’єкта. Тіло відповіді показує інформацію про створений аукціон, його внутрішнє id (яке співпадає з сегментом Location), його офіційне auctionID та dateModified дату, що показує час, коли аукціон востаннє модифікувався. Зверніть увагу на procurementMethodType, а також на те, що аукціон створюється зі статусом active.tendering.

Використаємо URL створеного об’єкта (заголовок відповіді Location):

GET /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28 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-PS-2017-11-30-000001",
    "enquiryPeriod": {
      "startDate": "2017-11-30T16:56:23.942831+02:00",
      "endDate": "2017-12-13T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2017-12-13T23:59:50+02:00",
    "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": "м. Київ"
      }
    },
    "owner": "broker",
    "id": "73e1598288054eb98e8153ee9e69bb28",
    "eligibilityCriteria_ru": "К участию допускаются только лицензированные финансовые учреждения.",
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "eligibilityCriteria_en": "Only licensed financial institutions are eligible to participate.",
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-11-30T16:56:23.946137+02:00",
    "status": "active.tendering",
    "eligibilityCriteria": "До участі допускаються лише ліцензовані фінансові установи.",
    "tenderPeriod": {
      "startDate": "2017-11-30T16:56:23.942831+02:00",
      "endDate": "2017-12-13T23:59:50+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-12-14T00:00:00+02:00"
    },
    "procurementMethodType": "dgfFinancialAssets",
    "dgfID": "219560",
    "date": "2017-11-30T16:56:23.942831+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "e16351a78632484e8756b1dea38e6201",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "highestCost"
  }
}

Ми бачимо ту ж відповідь, що і після створення аукціону.

Подивимось, що показує список аукціонів:

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-11-30T16%3A56%3A23.946137%2B02%3A00",
    "uri": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions?offset=2017-11-30T16%3A56%3A23.946137%2B02%3A00",
    "offset": "2017-11-30T16:56:23.946137+02:00"
  },
  "data": [
    {
      "id": "73e1598288054eb98e8153ee9e69bb28",
      "dateModified": "2017-11-30T16:56:23.946137+02:00"
    }
  ]
}

Ми бачимо внутрішнє id аукціону (що може бути використано для побудови повної URL-адреси, якщо додати http://api-sandbox.openprocurement.org/api/0/auctions/) та його dateModified дату.

Завантаження документації

Замовник може завантажити PDF файл у створений аукціон. Завантаження повинно відбуватись згідно правил Завантаження документа.

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents?acc_token=6c03609dd6844e42bc1318fddf20c937 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/1b63ae48aa3e4caf99aac3455888c7d6?KeyID=c822be4a&Signature=QCihV3O02wIHwqfKrwHkYdZ4jtSlChjb8EKFrnRDwr6fv1qdAOmQ7Id6vM0vCWQaWvv4%2FPpEwTE4DYGWUECgAQ%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/73e1598288054eb98e8153ee9e69bb28/documents/74e4e4b7624d420b8448a6220e0a86cf

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "technical specification",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/1b63ae48aa3e4caf99aac3455888c7d6?KeyID=c822be4a&Signature=Cqo%2Fl%2FHX9fy29aZ4TPnu9LB6ZtHdt6tquLKAJIGPLchoAf4OTMDnRAqLTeQK8rW9jgzFQ6I9HGfJtUP8i3gKDA%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.108881+02:00",
    "documentType": "technicalSpecifications",
    "dateModified": "2017-11-30T16:56:24.108911+02:00",
    "id": "74e4e4b7624d420b8448a6220e0a86cf"
  }
}

Код відповіді 201 Created та заголовок Location підтверджують, що документ було створено. Додатково можна зробити запит точки входу API колекції документів, щоб підтвердити дію:

GET /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents/74e4e4b7624d420b8448a6220e0a86cf 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/1b63ae48aa3e4caf99aac3455888c7d6?KeyID=c822be4a&Signature=Cqo%2Fl%2FHX9fy29aZ4TPnu9LB6ZtHdt6tquLKAJIGPLchoAf4OTMDnRAqLTeQK8rW9jgzFQ6I9HGfJtUP8i3gKDA%253D%253D",
    "title": "Notice.pdf",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.108881+02:00",
    "previousVersions": [],
    "documentType": "technicalSpecifications",
    "dateModified": "2017-11-30T16:56:24.108911+02:00",
    "id": "74e4e4b7624d420b8448a6220e0a86cf"
  }
}

Один елемент масиву описує завантажений документ. Ми можемо завантажити більше документів:

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents?acc_token=6c03609dd6844e42bc1318fddf20c937 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/b0a0c1a4b083475caaa4c8fb08d18781?KeyID=c822be4a&Signature=eUjEvPipgCDUg2CRW0uqyy%2Br5C7MNpbTp26C83J4cy7H84gzepDYr%2BfNWkPzjpTqZfg%2BIfTNVj86hY07Z9mcBA%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/73e1598288054eb98e8153ee9e69bb28/documents/55dc8e33c47948eab4e7b327bede3959

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/b0a0c1a4b083475caaa4c8fb08d18781?KeyID=c822be4a&Signature=xnYvodjAvZu8pjdlyQ4kdlC62x%252BEi2JnnuWKvRdNbne9KWdXVWSlqM%252BeGrGuJ4%252BS2e9qmZRCg9vHJvc1iz%252BMAA%253D%253D",
    "title": "AwardCriteria.pdf",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.174808+02:00",
    "dateModified": "2017-11-30T16:56:24.174838+02:00",
    "id": "55dc8e33c47948eab4e7b327bede3959"
  }
}

І знову можна перевірити, що є два завантажених документа.

GET /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents 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/1b63ae48aa3e4caf99aac3455888c7d6?KeyID=c822be4a&Signature=Cqo%2Fl%2FHX9fy29aZ4TPnu9LB6ZtHdt6tquLKAJIGPLchoAf4OTMDnRAqLTeQK8rW9jgzFQ6I9HGfJtUP8i3gKDA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:24.108881+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-11-30T16:56:24.108911+02:00",
      "id": "74e4e4b7624d420b8448a6220e0a86cf"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/b0a0c1a4b083475caaa4c8fb08d18781?KeyID=c822be4a&Signature=xnYvodjAvZu8pjdlyQ4kdlC62x%252BEi2JnnuWKvRdNbne9KWdXVWSlqM%252BeGrGuJ4%252BS2e9qmZRCg9vHJvc1iz%252BMAA%253D%253D",
      "title": "AwardCriteria.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:24.174808+02:00",
      "dateModified": "2017-11-30T16:56:24.174838+02:00",
      "id": "55dc8e33c47948eab4e7b327bede3959"
    }
  ]
}

Якщо сталась помилка, ми можемо ще раз завантажити документ поверх старої версії:

PUT /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents/55dc8e33c47948eab4e7b327bede3959?acc_token=6c03609dd6844e42bc1318fddf20c937 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 340
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/3efb323d6d6a42c9817ec011d6c8898f?KeyID=c822be4a&Signature=ihcWFQ7J6n6ycnrnh0RJKYBGr3PXLL4%2Fu39OMCUhkdXcrv9CY%2FXcFty3b%2BqTiMV6ODEMR7zAyub4CwZXgyoYBA%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/3efb323d6d6a42c9817ec011d6c8898f?KeyID=c822be4a&Signature=oMIup%252BjcxK%2FooCGXGpptyKCu1slmnk3T1I8XhOKPQXsKAD3R3zPyoDvYbF%252B47ZdbzNJ8m9v3TNQdsbseMlv7CA%253D%253D",
    "title": "AwardCriteria-2.pdf",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.174808+02:00",
    "dateModified": "2017-11-30T16:56:24.243244+02:00",
    "id": "55dc8e33c47948eab4e7b327bede3959"
  }
}

І ми бачимо, що вона перекриває оригінальну версію:

GET /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents 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/1b63ae48aa3e4caf99aac3455888c7d6?KeyID=c822be4a&Signature=Cqo%2Fl%2FHX9fy29aZ4TPnu9LB6ZtHdt6tquLKAJIGPLchoAf4OTMDnRAqLTeQK8rW9jgzFQ6I9HGfJtUP8i3gKDA%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:24.108881+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-11-30T16:56:24.108911+02:00",
      "id": "74e4e4b7624d420b8448a6220e0a86cf"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/3efb323d6d6a42c9817ec011d6c8898f?KeyID=c822be4a&Signature=oMIup%252BjcxK%2FooCGXGpptyKCu1slmnk3T1I8XhOKPQXsKAD3R3zPyoDvYbF%252B47ZdbzNJ8m9v3TNQdsbseMlv7CA%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:24.174808+02:00",
      "dateModified": "2017-11-30T16:56:24.243244+02:00",
      "id": "55dc8e33c47948eab4e7b327bede3959"
    }
  ]
}

Завантаження ілюстрації

Організатор може завантажити файли з ілюстраціями у створений аукціон. Завантаження повинно відповідати правилам Завантаження документа.

Для того, щоб вказати порядок відображення ілюстрацій, використовується поле index (див. Document). Оскільки ця ілюстрація повинна бути відображена першою, то вказується "index": 1

POST /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents?acc_token=ccf4d45ff9524ec9ae87f38c43d7b0a3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 436
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/2840dd02387746c8882c2087e55b9f14?KeyID=8473a74a&Signature=A72CeRi4%2B8fC9UG9C%2FuvfJdkbzFP52dV0xg%2B7gXZoHp3EF4HjQAR1xdz0W%2F%2BcV902JTBXbJG9ebWHwZiyU2HCg%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/301d66e275cb4861ba502c1eaafa88ae/documents/f143cdc5fef246f59d11cd3bc7c72d46

{
  "data": {
    "index": 1,
    "hash": "md5:00000000000000000000000000000000",
    "description": "First illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2840dd02387746c8882c2087e55b9f14?KeyID=8473a74a&Signature=CTN%2FyvXW3%252Bz7lGcIGWXJGAYdUUudzcpWk1%2F9TldffuMmRChRSJJsi%2F%2FHBzjXb%252B0f4DuzUiUbq8bqD%2FP70jlFAQ%253D%253D",
    "title": "first_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:26.293411+02:00",
    "documentType": "illustration",
    "dateModified": "2017-11-30T16:56:26.293438+02:00",
    "id": "f143cdc5fef246f59d11cd3bc7c72d46"
  }
}

Ми можемо перевірити, чи завантажилась ілюстрація.

GET /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents 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": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=u52VVOil6Bd6RED8Jt8wIJv2ioBCOV5meDxqcLgCksUxsJeTTj2aL5xHGYGjnsDBb0N6NohsEHBoxR5WaFE8Cw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.092186+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-11-30T16:56:26.092222+02:00",
      "id": "418d8f99150a4b92a57b81cc18cd968a"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9840d23dc3194951a561e6b3d959fac0?KeyID=8473a74a&Signature=vJlSrjCYsuQhptjoPNewJOzwmvXFcLc5HA8pIMybY%252B0qd7VYuGlhFpTPnwpMtpFEnblx87Fz%252BXuJ9x%2FBELicCg%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.157156+02:00",
      "dateModified": "2017-11-30T16:56:26.221784+02:00",
      "id": "3385ba24fb704db79cb8a70561e023c7"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2840dd02387746c8882c2087e55b9f14?KeyID=8473a74a&Signature=CTN%2FyvXW3%252Bz7lGcIGWXJGAYdUUudzcpWk1%2F9TldffuMmRChRSJJsi%2F%2FHBzjXb%252B0f4DuzUiUbq8bqD%2FP70jlFAQ%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.293411+02:00",
      "documentType": "illustration",
      "dateModified": "2017-11-30T16:56:26.293438+02:00",
      "id": "f143cdc5fef246f59d11cd3bc7c72d46"
    }
  ]
}

Організатор може завантажити ще одну ілюстрацію. Ця ілюстрація повинна бути відображена другою, тому має параметр "index": 2.

POST /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents?acc_token=ccf4d45ff9524ec9ae87f38c43d7b0a3 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/bfd750de3e7b49b5a991b6cdaf2c208e?KeyID=8473a74a&Signature=vmvWJOCo0jvQ1wr8Czb2%2BrC8ntp51VS0BYxtlXrCiPyKuKv7d7XJoVeAMmw8bH9RE28w1cW8BECbEgScz5ISBQ%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/301d66e275cb4861ba502c1eaafa88ae/documents/eb64e2d0457e42c89aed5861301d3d06

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Second illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/bfd750de3e7b49b5a991b6cdaf2c208e?KeyID=8473a74a&Signature=nXLYMy2OkK2aIJDwV6kn7z3BkQD4wMe1ccc9%252BSvKDcUemJGUcmxtcGPn57JUQ6AJznS4IfCvaHVyDo5Aez7pDA%253D%253D",
    "title": "second_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:26.376954+02:00",
    "documentType": "illustration",
    "dateModified": "2017-11-30T16:56:26.376981+02:00",
    "id": "eb64e2d0457e42c89aed5861301d3d06"
  }
}

Додаємо третю ілюстрацію:

POST /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents?acc_token=ccf4d45ff9524ec9ae87f38c43d7b0a3 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/2d40e8da608c4f10b9432671cf47c9aa?KeyID=8473a74a&Signature=BgTF%2BhgcDdTXB%2BMmv4Xfyl0PHorwUgDAKN7GVtlMm%2FoufbQVpM3pO11DN98KuWxwva2DIy73KKNE1hiIa53WBw%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/301d66e275cb4861ba502c1eaafa88ae/documents/fdafece528e54fe5a7b38f025be993c3

{
  "data": {
    "index": 2,
    "hash": "md5:00000000000000000000000000000000",
    "description": "Third illustration description",
    "format": "image/jpeg",
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2d40e8da608c4f10b9432671cf47c9aa?KeyID=8473a74a&Signature=AGnUbHWEz4OOa7kxT1%2Fj4Ml7cNOw%252BcsUiDVX9HQhwqAdi4UGtaxWqeAZ2YhsI20lzMp67Fq%252BUo6jPmWdLdWuAQ%253D%253D",
    "title": "third_illustration.jpeg",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:26.434267+02:00",
    "documentType": "illustration",
    "dateModified": "2017-11-30T16:56:26.434293+02:00",
    "id": "fdafece528e54fe5a7b38f025be993c3"
  }
}

Зверніть увагу, що параметр index третьої ілюстрації такий же як і у другої: "index": 2. У таких випадках спочатку відображатиметься ілюстрація з ранішою датою публікації.

Можемо перевірити, що є три завантажені ілюстрації.

GET /api/2.3/auctions/301d66e275cb4861ba502c1eaafa88ae/documents 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": "document description",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/323a56de45c243bb88a568c652d9ca2b?KeyID=8473a74a&Signature=u52VVOil6Bd6RED8Jt8wIJv2ioBCOV5meDxqcLgCksUxsJeTTj2aL5xHGYGjnsDBb0N6NohsEHBoxR5WaFE8Cw%253D%253D",
      "title": "Notice.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.092186+02:00",
      "documentType": "technicalSpecifications",
      "dateModified": "2017-11-30T16:56:26.092222+02:00",
      "id": "418d8f99150a4b92a57b81cc18cd968a"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "format": "application/pdf",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9840d23dc3194951a561e6b3d959fac0?KeyID=8473a74a&Signature=vJlSrjCYsuQhptjoPNewJOzwmvXFcLc5HA8pIMybY%252B0qd7VYuGlhFpTPnwpMtpFEnblx87Fz%252BXuJ9x%2FBELicCg%253D%253D",
      "title": "AwardCriteria-2.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.157156+02:00",
      "dateModified": "2017-11-30T16:56:26.221784+02:00",
      "id": "3385ba24fb704db79cb8a70561e023c7"
    },
    {
      "index": 1,
      "hash": "md5:00000000000000000000000000000000",
      "description": "First illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2840dd02387746c8882c2087e55b9f14?KeyID=8473a74a&Signature=CTN%2FyvXW3%252Bz7lGcIGWXJGAYdUUudzcpWk1%2F9TldffuMmRChRSJJsi%2F%2FHBzjXb%252B0f4DuzUiUbq8bqD%2FP70jlFAQ%253D%253D",
      "title": "first_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.293411+02:00",
      "documentType": "illustration",
      "dateModified": "2017-11-30T16:56:26.293438+02:00",
      "id": "f143cdc5fef246f59d11cd3bc7c72d46"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Second illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/bfd750de3e7b49b5a991b6cdaf2c208e?KeyID=8473a74a&Signature=nXLYMy2OkK2aIJDwV6kn7z3BkQD4wMe1ccc9%252BSvKDcUemJGUcmxtcGPn57JUQ6AJznS4IfCvaHVyDo5Aez7pDA%253D%253D",
      "title": "second_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.376954+02:00",
      "documentType": "illustration",
      "dateModified": "2017-11-30T16:56:26.376981+02:00",
      "id": "eb64e2d0457e42c89aed5861301d3d06"
    },
    {
      "index": 2,
      "hash": "md5:00000000000000000000000000000000",
      "description": "Third illustration description",
      "format": "image/jpeg",
      "url": "http://public.docs-sandbox.ea.openprocurement.org/get/2d40e8da608c4f10b9432671cf47c9aa?KeyID=8473a74a&Signature=AGnUbHWEz4OOa7kxT1%2Fj4Ml7cNOw%252BcsUiDVX9HQhwqAdi4UGtaxWqeAZ2YhsI20lzMp67Fq%252BUo6jPmWdLdWuAQ%253D%253D",
      "title": "third_illustration.jpeg",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:26.434267+02:00",
      "documentType": "illustration",
      "dateModified": "2017-11-30T16:56:26.434293+02:00",
      "id": "fdafece528e54fe5a7b38f025be993c3"
    }
  ]
}

Додавання віртуальної кімнати для роботи з конфіденційними даними

Організатор може додати URL-адресу віртуальної кімнати для роботи з конфіденційними даними:

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/documents?acc_token=6c03609dd6844e42bc1318fddf20c937 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/73e1598288054eb98e8153ee9e69bb28/documents/4e24994ddc1c4c72b24b992f8826acf4

{
  "data": {
    "title": "VDR for auction lot",
    "url": "http://virtial-data-room.com/id_of_room",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.313920+02:00",
    "documentType": "virtualDataRoom",
    "dateModified": "2017-11-30T16:56:24.313948+02:00",
    "id": "4e24994ddc1c4c72b24b992f8826acf4"
  }
}

Реєстрація пропозиції

Учасник може зареєструвати пропозицію у статусі draft (чернетка). Учасник повинен вказати значення UA-FIN для параметра additionalIdentifiers.

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/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/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca

{
  "access": {
    "token": "b6c5e3c4087848a08703ae24889033a7"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 469.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-11-30T16:56:24.381299+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": "c7a52fb296b143cc87728f74b2585fca"
  }
}

І активувати пропозицію:

PATCH /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca?acc_token=b6c5e3c4087848a08703ae24889033a7 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

І завантажити ліцензію (вказавши documentType: financialLicense):

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca/documents?acc_token=b6c5e3c4087848a08703ae24889033a7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 381
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.ea.openprocurement.org/get/9d26f2842ae149228d379eb98961e054?KeyID=c822be4a&Signature=GihlzLpKCv%2Fv86BLw%2Fn8wAMDJhbuncQkvQpe68VIyD15Z0MfPipOfda9ENxJNDZ3ygf%2B%2F8%2Fv6AypQlORVmLoDw%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/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca/documents/523bf2858a644c37bb188b696ae1ee65

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf",
    "url": "http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca/documents/523bf2858a644c37bb188b696ae1ee65?download=9d26f2842ae149228d379eb98961e054",
    "title": "FinancialLicense.pdf",
    "documentOf": "tender",
    "datePublished": "2017-11-30T16:56:24.486255+02:00",
    "documentType": "financialLicense",
    "dateModified": "2017-11-30T16:56:24.486283+02:00",
    "id": "523bf2858a644c37bb188b696ae1ee65"
  }
}

Можна перевірити завантажені документи:

GET /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca/documents?acc_token=b6c5e3c4087848a08703ae24889033a7 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/73e1598288054eb98e8153ee9e69bb28/bids/c7a52fb296b143cc87728f74b2585fca/documents/523bf2858a644c37bb188b696ae1ee65?download=9d26f2842ae149228d379eb98961e054",
      "title": "FinancialLicense.pdf",
      "documentOf": "tender",
      "datePublished": "2017-11-30T16:56:24.486255+02:00",
      "documentType": "financialLicense",
      "dateModified": "2017-11-30T16:56:24.486283+02:00",
      "id": "523bf2858a644c37bb188b696ae1ee65"
    }
  ]
}

Для найкращого результату (найбільшої економії) аукціон повинен мати багато зареєстрованих учасників.

POST /api/2.3/auctions/73e1598288054eb98e8153ee9e69bb28/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/73e1598288054eb98e8153ee9e69bb28/bids/afc000ac87e642d8b70141957772cdb8

{
  "access": {
    "token": "47bbd4a1e6f9460b94cea52301caca48"
  },
  "data": {
    "status": "active",
    "eligible": true,
    "value": {
      "currency": "UAH",
      "amount": 479.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-11-30T16:56:24.588843+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": "afc000ac87e642d8b70141957772cdb8"
  }
}