Confidential documents

Confidential documents are supported for bids in the above threshold procedures.

Confidentiality

Documents can be either public or private:

  1. Privacy settings can be changed only for the latest version of the document.
  2. When you upload new version of the document, privacy settings are copied from the previous version.
  3. Privacy settings can be changed only during tenderPeriod (with active.tendering status).
  4. If tender has status active.qualification winner can upload only public documents.

Tutorial

Let’s upload a private document

POST /api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents?acc_token=dd8db01099664827aa1826260c296fa8 HTTP/1.0
Authorization: Bearer broker
Content-Length: 462
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "confidentiality": "buyerOnly",
    "title": "private.doc",
    "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a80b88c2517343558b6e061f834130a6?KeyID=a8968c46&Signature=HIm0blH%2BhAke1zBWo25GwhAsfq%2BSc%2FG532m%2BIIPcnJw4iaHt2cPyPfq6Wn1Dnowa10yu%2Fe7daveFu0G1PJQ%2FDw%3D%3D",
    "confidentialityRationale": "This document contains some secret data that shouldn't be public",
    "format": "application/msword"
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/307e274695ab4ae787ae6125f08956dc
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "confidentiality": "buyerOnly",
    "title": "private.doc",
    "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/307e274695ab4ae787ae6125f08956dc?download=a80b88c2517343558b6e061f834130a6",
    "confidentialityRationale": "This document contains some secret data that shouldn't be public",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "id": "307e274695ab4ae787ae6125f08956dc",
    "dateModified": "2019-10-25T01:00:00+03:00"
  }
}

confidentiality can be changed during active.tendering tender status

PATCH /api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/dbd45ebd0e9d4f6fa53efaff96a144c1?acc_token=dd8db01099664827aa1826260c296fa8 HTTP/1.0
Authorization: Bearer broker
Content-Length: 178
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "confidentialityRationale": "Lol, this document contains some secret data that shouldn't be public, I'm changing it's confidentiality",
    "confidentiality": "buyerOnly"
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "confidentiality": "buyerOnly",
    "title": "public-to-private.doc",
    "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/dbd45ebd0e9d4f6fa53efaff96a144c1?download=284617724bff4ff6bd1023f665da3b47",
    "confidentialityRationale": "Lol, this document contains some secret data that shouldn't be public, I'm changing it's confidentiality",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2019-10-25T01:00:00+03:00",
    "id": "dbd45ebd0e9d4f6fa53efaff96a144c1",
    "dateModified": "2019-10-25T01:00:00+03:00"
  }
}

The confidential documents shown without the url field

GET /api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "confidentiality": "buyerOnly",
      "title": "private.doc",
      "confidentialityRationale": "This document contains some secret data that shouldn't be public",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "dateModified": "2019-10-25T01:00:00+03:00",
      "id": "307e274695ab4ae787ae6125f08956dc"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "confidentiality": "buyerOnly",
      "title": "public-to-private.doc",
      "confidentialityRationale": "Lol, this document contains some secret data that shouldn't be public, I'm changing it's confidentiality",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "dateModified": "2019-10-25T01:00:00+03:00",
      "id": "dbd45ebd0e9d4f6fa53efaff96a144c1"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "public.doc",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/aef3d5621c2b4f80ba8bad34c4e234be?KeyID=a8968c46&Signature=ecMxMkHmJGMdBO%2FRF%2FheD0B4yPa%252B5rAxpglLW5ZBltgJNrGY%2F3Zko8oL117%252BQ95Eossv5LcWOR1mC%252BDBEcBQDg%253D%253D",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "abce1a8622a04fcb98e1483f9ab0b898",
      "dateModified": "2019-10-25T01:00:00+03:00"
    }
  ]
}

Only tender and bid owner should see the url fields and be able to download confidential documents

GET /api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents?acc_token=62607c36ce4a4d64961ecc0d0a21540e HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "confidentiality": "buyerOnly",
      "title": "private.doc",
      "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/307e274695ab4ae787ae6125f08956dc?download=a80b88c2517343558b6e061f834130a6",
      "confidentialityRationale": "This document contains some secret data that shouldn't be public",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "307e274695ab4ae787ae6125f08956dc",
      "dateModified": "2019-10-25T01:00:00+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "confidentiality": "buyerOnly",
      "title": "public-to-private.doc",
      "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7898ec9992af47ccbc9b8bf1b8539660/bids/bc8deddfb8244a33a878ccdd7ce24616/documents/dbd45ebd0e9d4f6fa53efaff96a144c1?download=284617724bff4ff6bd1023f665da3b47",
      "confidentialityRationale": "Lol, this document contains some secret data that shouldn't be public, I'm changing it's confidentiality",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "dbd45ebd0e9d4f6fa53efaff96a144c1",
      "dateModified": "2019-10-25T01:00:00+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "public.doc",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/aef3d5621c2b4f80ba8bad34c4e234be?KeyID=a8968c46&Signature=ecMxMkHmJGMdBO%2FRF%2FheD0B4yPa%252B5rAxpglLW5ZBltgJNrGY%2F3Zko8oL117%252BQ95Eossv5LcWOR1mC%252BDBEcBQDg%253D%253D",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2019-10-25T01:00:00+03:00",
      "id": "abce1a8622a04fcb98e1483f9ab0b898",
      "dateModified": "2019-10-25T01:00:00+03:00"
    }
  ]
}