Tutorial

Exploring basic rules

Let’s try exploring the /tenders endpoint:

GET /api/2.3/tenders HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "next_page": {
    "path": "/api/2.3/tenders?offset=",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=",
    "offset": ""
  },
  "data": []
}

Just invoking it reveals empty set.

Now let’s attempt creating some tender:

POST /api/2.3/tenders?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
Host: api-sandbox.openprocurement.org


415 Unsupported Media Type
Content-Type: application/json; charset=UTF-8

{
  "status": "error",
  "errors": [
    {
      "description": "Content-Type header should be one of ['application/json']",
      "location": "header",
      "name": "Content-Type"
    }
  ]
}

Error states that the only accepted Content-Type is application/json.

Let’s satisfy the Content-type requirement:

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


422 Unprocessable Entity
Content-Type: application/json; charset=UTF-8

{
  "status": "error",
  "errors": [
    {
      "description": "No JSON object could be decoded",
      "location": "body",
      "name": "data"
    }
  ]
}

Error states that no data has been found in JSON body.

Creating tender

Let’s create tender with the minimal (only required) data set:

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

{
  "data": {
    "tenderPeriod": {
      "endDate": "2017-07-08T18:05:33.770353"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2017-07-01T18:05:33.770353"
    },
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353",
          "endDate": "2017-06-29T18:05:33.770353"
        },
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46

{
  "access": {
    "token": "b84904c40e484b2e9be9af92d1cca8ae"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "awardCriteria": "lowestCost",
    "tenderPeriod": {
      "startDate": "2017-07-01T18:05:33.770353+03:00",
      "endDate": "2017-07-08T18:05:33.770353+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2017-06-24T18:05:45.698533+03:00",
    "next_check": "2017-07-01T18:05:33.770353+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2017-06-24T18:05:45.698458+03:00",
      "endDate": "2017-07-01T18:05:33.770353+03:00"
    },
    "owner": "broker",
    "dateModified": "2017-06-24T18:05:45.704170+03:00",
    "id": "f860f9fe94574d729c87f81cea222b46",
    "tenderID": "UA-2017-06-24-000001"
  }
}

Success! Now we can see that new object was 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 tender: its internal id (that matches the Location segment), its official tenderID and dateModified datestamp stating the moment in time when tender was last modified. Pay attention to the procurementMethodType. Note that tender is created with active.enquiries status.

Let’s access the URL of the created object (the Location header of the response):

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "awardCriteria": "lowestCost",
    "tenderPeriod": {
      "startDate": "2017-07-01T18:05:33.770353+03:00",
      "endDate": "2017-07-08T18:05:33.770353+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2017-06-24T18:05:45.698533+03:00",
    "next_check": "2017-07-01T18:05:33.770353+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2017-06-24T18:05:45.698458+03:00",
      "endDate": "2017-07-01T18:05:33.770353+03:00"
    },
    "owner": "broker",
    "dateModified": "2017-06-24T18:05:45.704170+03:00",
    "id": "f860f9fe94574d729c87f81cea222b46",
    "tenderID": "UA-2017-06-24-000001"
  }
}

We can see the same response we got after creating tender.

Let’s see what listing of tenders reveals us:

GET /api/2.3/tenders HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "next_page": {
    "path": "/api/2.3/tenders?offset=",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=",
    "offset": ""
  },
  "data": []
}

We do see the internal id of a tender (that can be used to construct full URL by prepending http://api-sandbox.openprocurement.org/api/0/tenders/) and its dateModified datestamp.

The previous tender contained only required fields. Let’s try creating tender with more data (tender has status created):

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

{
  "data": {
    "features": [
      {
        "code": "OCDS-123454-AIR-INTAKE",
        "description": "Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
        "title": "Потужність всмоктування",
        "enum": [
          {
            "value": 0.1,
            "title": "До 1000 Вт"
          },
          {
            "value": 0.15,
            "title": "Більше 1000 Вт"
          }
        ],
        "title_en": "Air Intake",
        "relatedItem": "0c0654bc00ef44f5803347384b028d32",
        "featureOf": "item"
      },
      {
        "code": "OCDS-123454-YEARS",
        "description": "Кількість років, які організація учасник працює на ринку",
        "title": "Років на ринку",
        "enum": [
          {
            "value": 0.05,
            "title": "До 3 років"
          },
          {
            "value": 0.1,
            "title": "Більше 3 років, менше 5 років"
          },
          {
            "value": 0.15,
            "title": "Більше 5 років"
          }
        ],
        "title_en": "Years trading",
        "featureOf": "tenderer"
      }
    ],
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2017-07-01T18:05:33.802174"
    },
    "title_en": "Cases with state awards",
    "value": {
      "currency": "UAH",
      "amount": 500
    },
    "mode": "test",
    "procurementMethodType": "belowThreshold",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    },
    "title_ru": "футляры к государственным наградам",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "0c0654bc00ef44f5803347384b028d32",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "tenderPeriod": {
      "endDate": "2017-07-08T18:05:33.802174"
    }
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/6b5f498200e44d2ea9270a9ce4d2ea97

{
  "access": {
    "token": "ed6a500a2e3d4569b2e2339414cf515f"
  },
  "data": {
    "procurementMethod": "open",
    "features": [
      {
        "code": "OCDS-123454-AIR-INTAKE",
        "description": "Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
        "title": "Потужність всмоктування",
        "enum": [
          {
            "value": 0.1,
            "title": "До 1000 Вт"
          },
          {
            "value": 0.15,
            "title": "Більше 1000 Вт"
          }
        ],
        "title_en": "Air Intake",
        "relatedItem": "0c0654bc00ef44f5803347384b028d32",
        "featureOf": "item"
      },
      {
        "code": "OCDS-123454-YEARS",
        "description": "Кількість років, які організація учасник працює на ринку",
        "title": "Років на ринку",
        "enum": [
          {
            "value": 0.05,
            "title": "До 3 років"
          },
          {
            "value": 0.1,
            "title": "Більше 3 років, менше 5 років"
          },
          {
            "value": 0.15,
            "title": "Більше 5 років"
          }
        ],
        "title_en": "Years trading",
        "featureOf": "tenderer"
      }
    ],
    "enquiryPeriod": {
      "startDate": "2017-06-24T18:05:45.862647+03:00",
      "endDate": "2017-07-01T18:05:33.802174+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2017-07-01T18:05:33.802174+03:00",
    "awardCriteria": "lowestCost",
    "owner": "broker",
    "id": "6b5f498200e44d2ea9270a9ce4d2ea97",
    "title": "[ТЕСТУВАННЯ] футляри до державних нагород",
    "tenderID": "UA-2017-06-24-000002",
    "dateModified": "2017-06-24T18:05:45.868920+03:00",
    "status": "active.enquiries",
    "tenderPeriod": {
      "startDate": "2017-07-01T18:05:33.802174+03:00",
      "endDate": "2017-07-08T18:05:33.802174+03:00"
    },
    "procurementMethodType": "belowThreshold",
    "title_en": "[TESTING] Cases with state awards",
    "date": "2017-06-24T18:05:45.862702+03:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "0c0654bc00ef44f5803347384b028d32",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "mode": "test",
    "title_ru": "[ТЕСТИРОВАНИЕ] футляры к государственным наградам",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}

And again we have 201 Created response code, Location header and body with extra id, tenderID, and dateModified properties.

Let’s check what tender registry contains:

GET /api/2.3/tenders HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "next_page": {
    "path": "/api/2.3/tenders?offset=2017-06-24T18%3A05%3A45.704170%2B03%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=2017-06-24T18%3A05%3A45.704170%2B03%3A00",
    "offset": "2017-06-24T18:05:45.704170+03:00"
  },
  "data": [
    {
      "id": "f860f9fe94574d729c87f81cea222b46",
      "dateModified": "2017-06-24T18:05:45.704170+03:00"
    }
  ]
}

And indeed we have 2 tenders now.

Modifying tender

Let’s update tender by supplementing it with all other essential properties:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 75
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "tenderPeriod": {
      "endDate": "2017-07-09T18:05:56.035089+03:00"
    }
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "awardCriteria": "lowestCost",
    "tenderPeriod": {
      "startDate": "2017-07-01T18:05:33.770353+03:00",
      "endDate": "2017-07-09T18:05:56.035089+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2017-06-24T18:05:45.698533+03:00",
    "next_check": "2017-07-01T18:05:33.770353+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2017-06-24T18:05:45.698458+03:00",
      "endDate": "2017-07-01T18:05:33.770353+03:00"
    },
    "owner": "broker",
    "dateModified": "2017-06-24T18:05:46.099083+03:00",
    "id": "f860f9fe94574d729c87f81cea222b46",
    "tenderID": "UA-2017-06-24-000001"
  }
}

We see the added properies have merged with existing tender data. Additionally, the dateModified property was updated to reflect the last modification datestamp.

Checking the listing again reflects the new modification date:

GET /api/2.3/tenders?opt_pretty=1 HTTP/1.0
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "next_page": {
    "path": "/api/2.3/tenders?offset=2017-06-24T18%3A05%3A45.959328%2B03%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=2017-06-24T18%3A05%3A45.959328%2B03%3A00",
    "offset": "2017-06-24T18:05:45.959328+03:00"
  },
  "data": [
    {
      "id": "f860f9fe94574d729c87f81cea222b46",
      "dateModified": "2017-06-24T18:05:45.704170+03:00"
    },
    {
      "id": "d884d7a1dd6447618b0670d19ab72a4b",
      "dateModified": "2017-06-24T18:05:45.959328+03:00"
    }
  ]
}

Procuring entity can set bid guarantee:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 57
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "guarantee": {
      "currency": "USD",
      "amount": 8
    }
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "awardCriteria": "lowestCost",
    "tenderPeriod": {
      "startDate": "2017-07-01T18:05:33.770353+03:00",
      "endDate": "2017-07-09T18:05:56.035089+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2017-06-24T18:05:45.698533+03:00",
    "next_check": "2017-07-01T18:05:33.770353+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "enquiryPeriod": {
      "startDate": "2017-06-24T18:05:45.698458+03:00",
      "endDate": "2017-07-01T18:05:33.770353+03:00"
    },
    "owner": "broker",
    "dateModified": "2017-06-24T18:05:46.257890+03:00",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "id": "f860f9fe94574d729c87f81cea222b46",
    "tenderID": "UA-2017-06-24-000001"
  }
}

Uploading documentation

Procuring entity can upload PDF files into the created tender. Uploading should follow the Documents Uploading rules.

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 324
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=tfUwl51t5wGSphUKaNLRqN7AbdYACSV10Rk1QcIO1J%2FlfS1sPxmVkRdM8f2WvWT9Qg4XanzZIxhOGEPhCa86Aw%3D%3D",
    "title": "Notice.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents/0d34d2cd91f14650af325f081014e682

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.316547+03:00",
    "id": "0d34d2cd91f14650af325f081014e682",
    "dateModified": "2017-06-24T18:05:46.316590+03:00"
  }
}

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/tenders/f860f9fe94574d729c87f81cea222b46/documents/0d34d2cd91f14650af325f081014e682 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.316547+03:00",
    "previousVersions": [],
    "id": "0d34d2cd91f14650af325f081014e682",
    "dateModified": "2017-06-24T18:05:46.316590+03:00"
  }
}

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

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 335
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/58577196924f4ba995155fc3dbc3b3fd?KeyID=661750a8&Signature=gLBh7DCJ9E8mRXNBMMkSJyEUKtTrl1uIT9Zlu9mZhtiXGvIVxsIyDnF34E%2BrKOtOkO%2F6%2B8E81GiH1z92N5MeCw%3D%3D",
    "title": "AwardCriteria.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents/9f28e5dbb5254b8abba2b6eca5f46bb1

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "AwardCriteria.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/58577196924f4ba995155fc3dbc3b3fd?KeyID=661750a8&Signature=VgsAsmxGq3uGKvxdKmYic78oDL30P9P2EXXwNS%2FjTjtj0NVPKis7YeyLL%252B3NipGWXOPnglkj3QdMsTRqtsRmBA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.511984+03:00",
    "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
    "dateModified": "2017-06-24T18:05:46.512018+03:00"
  }
}

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

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.316547+03:00",
      "author": "tender_owner",
      "documentType": "technicalSpecifications",
      "id": "0d34d2cd91f14650af325f081014e682",
      "dateModified": "2017-06-24T18:05:46.316590+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "AwardCriteria.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/58577196924f4ba995155fc3dbc3b3fd?KeyID=661750a8&Signature=VgsAsmxGq3uGKvxdKmYic78oDL30P9P2EXXwNS%2FjTjtj0NVPKis7YeyLL%252B3NipGWXOPnglkj3QdMsTRqtsRmBA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.511984+03:00",
      "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
      "dateModified": "2017-06-24T18:05:46.512018+03:00"
    }
  ]
}

Let’s add new documentType field with technicalSpecifications parameter to the previously uploaded document:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents/0d34d2cd91f14650af325f081014e682?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 53
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "documentType": "technicalSpecifications"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "author": "tender_owner",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.316547+03:00",
    "documentType": "technicalSpecifications",
    "id": "0d34d2cd91f14650af325f081014e682",
    "dateModified": "2017-06-24T18:05:46.316590+03:00"
  }
}

Success! Response code is 200 OK and it confirms that documentType field with technicalSpecifications parameter was added .

Now let’s try to modify any field in our document. For example, description:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents/0d34d2cd91f14650af325f081014e682?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 58
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "description": "document description modified"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "document description modified",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.316547+03:00",
    "author": "tender_owner",
    "documentType": "technicalSpecifications",
    "id": "0d34d2cd91f14650af325f081014e682",
    "dateModified": "2017-06-24T18:05:46.316590+03:00"
  }
}

200 OK response was returned. The description was modified successfully.

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

PUT /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents/9f28e5dbb5254b8abba2b6eca5f46bb1?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 339
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/5f93abc2decd401fbee841489bfdc85c?KeyID=661750a8&Signature=FcL0qq4PcFtH9CXccrG1t%2B7kSfPvasCPJ4Q7FFOupnoEfjPEPDnHrDAmy3ZkG%2Bb2aP0PV%2Bo%2FPPyyMyJnvCusAA%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",
    "author": "tender_owner",
    "title": "AwardCriteria-2.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/5f93abc2decd401fbee841489bfdc85c?KeyID=661750a8&Signature=hKSFUPpGZs%252BJH24dxTeF9QmxEVY8%252BtQRg54NzTQa2LXCgy8r3OZsAPi0L5aP6NnAs4sGZErqhAMkNjBChlylBw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:46.511984+03:00",
    "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
    "dateModified": "2017-06-24T18:05:46.593214+03:00"
  }
}

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

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.316547+03:00",
      "author": "tender_owner",
      "documentType": "technicalSpecifications",
      "id": "0d34d2cd91f14650af325f081014e682",
      "dateModified": "2017-06-24T18:05:46.316590+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "author": "tender_owner",
      "title": "AwardCriteria-2.pdf",
      "url": "http://public.docs-sandbox.openprocurement.org/get/5f93abc2decd401fbee841489bfdc85c?KeyID=661750a8&Signature=hKSFUPpGZs%252BJH24dxTeF9QmxEVY8%252BtQRg54NzTQa2LXCgy8r3OZsAPi0L5aP6NnAs4sGZErqhAMkNjBChlylBw%253D%253D",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:46.511984+03:00",
      "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
      "dateModified": "2017-06-24T18:05:46.593214+03:00"
    }
  ]
}

Enquiries

When tender is in active.enquiry status, interested parties can ask questions:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/questions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1506
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "author": {
      "contactPoint": {
        "telephone": "+380 (432) 21-69-30",
        "name": "Сергій Олексюк",
        "email": "soleksuk@gmail.com"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
        "id": "00137226",
        "uri": "http://sch10.edu.vn.ua/"
      },
      "name": "ДКП «Школяр»",
      "address": {
        "countryName": "Україна",
        "postalCode": "21100",
        "region": "м. Вінниця",
        "streetAddress": "вул. Островського, 33",
        "locality": "м. Вінниця"
      }
    },
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/questions/51facfd766014f0a822976c56faef544

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "author": {
      "contactPoint": {
        "email": "soleksuk@gmail.com",
        "telephone": "+380 (432) 21-69-30",
        "name": "Сергій Олексюк"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
        "id": "00137226",
        "uri": "http://sch10.edu.vn.ua/"
      },
      "name": "ДКП «Школяр»",
      "address": {
        "postalCode": "21100",
        "countryName": "Україна",
        "streetAddress": "вул. Островського, 33",
        "region": "м. Вінниця",
        "locality": "м. Вінниця"
      }
    },
    "title": "Калорійність",
    "date": "2017-06-24T18:05:46.687006+03:00",
    "id": "51facfd766014f0a822976c56faef544",
    "questionOf": "tender"
  }
}

Procuring entity can answer them:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/questions/51facfd766014f0a822976c56faef544?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 162
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\""
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "dateAnswered": "2017-06-24T18:05:46.762716+03:00",
    "title": "Калорійність",
    "date": "2017-06-24T18:05:46.687006+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "51facfd766014f0a822976c56faef544",
    "questionOf": "tender"
  }
}

And one can retrieve the questions list:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/questions HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "description": "Просимо додати таблицю потрібної калорійності харчування",
      "dateAnswered": "2017-06-24T18:05:46.762716+03:00",
      "title": "Калорійність",
      "date": "2017-06-24T18:05:46.687006+03:00",
      "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
      "id": "51facfd766014f0a822976c56faef544",
      "questionOf": "tender"
    }
  ]
}

And individual answer:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/questions/51facfd766014f0a822976c56faef544 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "dateAnswered": "2017-06-24T18:05:46.762716+03:00",
    "title": "Калорійність",
    "date": "2017-06-24T18:05:46.687006+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "51facfd766014f0a822976c56faef544",
    "questionOf": "tender"
  }
}

Registering bid

Step-by-step registration

When Tender.tenderingPeriod.startDate comes, Tender switches to active.tendering status that allows registration of bids.

Bidder can register a bid in draft status:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 757
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "draft",
    "value": {
      "amount": 500
    },
    "tenderers": [
      {
        "contactPoint": {
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк",
          "email": "soleksuk@gmail.com"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "countryName": "Україна",
          "postalCode": "21100",
          "region": "м. Вінниця",
          "streetAddress": "вул. Островського, 33",
          "locality": "м. Вінниця"
        }
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3

{
  "access": {
    "token": "72610f3b588d40bbb2e592399d61929d"
  },
  "data": {
    "date": "2017-06-24T18:05:46.945461+03:00",
    "status": "draft",
    "id": "dcf9752855e543a391fd08ec13328ed3",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ]
  }
}

And activate a bid:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3?acc_token=72610f3b588d40bbb2e592399d61929d HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "date": "2017-06-24T18:05:46.945461+03:00",
    "status": "active",
    "id": "dcf9752855e543a391fd08ec13328ed3",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ]
  }
}

And upload proposal document:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents?acc_token=72610f3b588d40bbb2e592399d61929d HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 328
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/18bdbf464a504c089e0a2b2a93327e1d?KeyID=661750a8&Signature=WhcQpBxFZpbuipSZaPAGE9Kni3kePtjzmaQbK3wvK5CYGz5GARggzUTAyLc86DmnScU%2B2nA6Shiv3KLyr5Y%2FCA%3D%3D",
    "title": "Proposal.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents/4f7d4dc31efd465b832ad9b68aa49284

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "Proposal.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents/4f7d4dc31efd465b832ad9b68aa49284?download=18bdbf464a504c089e0a2b2a93327e1d",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:47.129752+03:00",
    "id": "4f7d4dc31efd465b832ad9b68aa49284",
    "dateModified": "2017-06-24T18:05:47.129786+03:00"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents?acc_token=72610f3b588d40bbb2e592399d61929d HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "Proposal.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents/4f7d4dc31efd465b832ad9b68aa49284?download=18bdbf464a504c089e0a2b2a93327e1d",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:47.129752+03:00",
      "id": "4f7d4dc31efd465b832ad9b68aa49284",
      "dateModified": "2017-06-24T18:05:47.129786+03:00"
    }
  ]
}

Batch-mode registration

Register bid with documents using one request:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1377
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "documents": [
      {
        "url": "http://public.docs-sandbox.openprocurement.org/get/a6a010ec141e4c2b8d6197d3f1c68f0f?KeyID=661750a8&Signature=%2BFDxLL7Ss52mLPP%2Fk6dvrpXNgmSSOAbMcGqLelmLr4TekhvK%2F5oXR5%2BidbLq9OqQpkfjF8VUeLCrsHS%2BmOfBBQ%3D%3D",
        "title": "Proposal_part1.pdf",
        "hash": "md5:00000000000000000000000000000000",
        "format": "application/pdf"
      },
      {
        "url": "http://public.docs-sandbox.openprocurement.org/get/ad2e984d49f541689ca0ed155adef063?KeyID=661750a8&Signature=Rli79c00TqvfjP6fnbhHdDnqiniIJcc8I2%2Bc%2BouweWabNxLBajvq3r8ddf3jyaSjD3F5xqYPBkqnQUyawbdIDw%3D%3D",
        "title": "Proposal_part2.pdf",
        "hash": "md5:00000000000000000000000000000000",
        "format": "application/pdf"
      }
    ],
    "value": {
      "amount": 499
    },
    "tenderers": [
      {
        "contactPoint": {
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк",
          "email": "aagt@gmail.com"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "countryName": "Україна",
          "postalCode": "79013",
          "region": "м. Львів",
          "streetAddress": "вул. Островського, 34",
          "locality": "м. Львів"
        }
      }
    ]
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f

{
  "access": {
    "token": "cbef7d4282894ae9b51eae637d97b2c6"
  },
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal_part1.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f/documents/f872e90507f14f48bca386fe0eadf502?download=a6a010ec141e4c2b8d6197d3f1c68f0f",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:47.259310+03:00",
        "id": "f872e90507f14f48bca386fe0eadf502",
        "dateModified": "2017-06-24T18:05:47.259343+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal_part2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f/documents/a6cf8c26526e4ccb94e23fa979c3cd58?download=ad2e984d49f541689ca0ed155adef063",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:47.260182+03:00",
        "id": "a6cf8c26526e4ccb94e23fa979c3cd58",
        "dateModified": "2017-06-24T18:05:47.260213+03:00"
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "date": "2017-06-24T18:05:47.258272+03:00",
    "id": "3310692784ce42bfb7cd8fac8add180f"
  }
}

Auction

After auction is scheduled anybody can visit it to watch. The auction can be reached at Tender.auctionUrl:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "auctionUrl": "http://auction-sandbox.openprocurement.org/tenders/f860f9fe94574d729c87f81cea222b46",
    "enquiryPeriod": {
      "startDate": "2017-06-10T18:05:33.770353+03:00",
      "endDate": "2017-06-17T18:05:33.770353+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2017-06-24T18:41:33.770353+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "kind": "general",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    },
    "questions": [
      {
        "description": "Просимо додати таблицю потрібної калорійності харчування",
        "dateAnswered": "2017-06-24T18:05:46.762716+03:00",
        "title": "Калорійність",
        "date": "2017-06-24T18:05:46.687006+03:00",
        "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
        "id": "51facfd766014f0a822976c56faef544",
        "questionOf": "tender"
      }
    ],
    "owner": "broker",
    "id": "f860f9fe94574d729c87f81cea222b46",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "description": "document description modified",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.openprocurement.org/get/789735fb78a349da9f22a4bb3cb6b32f?KeyID=661750a8&Signature=b1y%252BWqNZyRMzQ08R49e8ajjS5Io1JCpsHXdiB7AyfjAYwJLqRtrU%2Fdnj3oSEhiAgw87czAsRdlpWiQi5k23xDA%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:46.316547+03:00",
        "author": "tender_owner",
        "documentType": "technicalSpecifications",
        "id": "0d34d2cd91f14650af325f081014e682",
        "dateModified": "2017-06-24T18:05:46.316590+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria.pdf",
        "url": "http://public.docs-sandbox.openprocurement.org/get/58577196924f4ba995155fc3dbc3b3fd?KeyID=661750a8&Signature=VgsAsmxGq3uGKvxdKmYic78oDL30P9P2EXXwNS%2FjTjtj0NVPKis7YeyLL%252B3NipGWXOPnglkj3QdMsTRqtsRmBA%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:46.511984+03:00",
        "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
        "dateModified": "2017-06-24T18:05:46.512018+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "author": "tender_owner",
        "title": "AwardCriteria-2.pdf",
        "url": "http://public.docs-sandbox.openprocurement.org/get/5f93abc2decd401fbee841489bfdc85c?KeyID=661750a8&Signature=hKSFUPpGZs%252BJH24dxTeF9QmxEVY8%252BtQRg54NzTQa2LXCgy8r3OZsAPi0L5aP6NnAs4sGZErqhAMkNjBChlylBw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:46.511984+03:00",
        "id": "9f28e5dbb5254b8abba2b6eca5f46bb1",
        "dateModified": "2017-06-24T18:05:46.593214+03:00"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderID": "UA-2017-06-24-000001",
    "dateModified": "2017-06-24T18:05:47.568050+03:00",
    "status": "active.auction",
    "tenderPeriod": {
      "startDate": "2017-06-17T18:05:33.770353+03:00",
      "endDate": "2017-06-24T18:05:33.770353+03:00"
    },
    "auctionPeriod": {
      "startDate": "2017-06-24T18:05:33.770353+03:00",
      "shouldStartAfter": "2017-06-25T00:00:00+03:00"
    },
    "procurementMethodType": "belowThreshold",
    "date": "2017-06-24T18:05:45.698533+03:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "lowestCost"
  }
}

And bidders can find out their participation URLs via their bids:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3?acc_token=72610f3b588d40bbb2e592399d61929d HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/dcf9752855e543a391fd08ec13328ed3/documents/4f7d4dc31efd465b832ad9b68aa49284?download=18bdbf464a504c089e0a2b2a93327e1d",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:47.129752+03:00",
        "id": "4f7d4dc31efd465b832ad9b68aa49284",
        "dateModified": "2017-06-24T18:05:47.129786+03:00"
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "soleksuk@gmail.com",
          "telephone": "+380 (432) 21-69-30",
          "name": "Сергій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137256",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Школяр»",
        "address": {
          "postalCode": "21100",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 33",
          "region": "м. Вінниця",
          "locality": "м. Вінниця"
        }
      }
    ],
    "date": "2017-06-24T18:05:46.945461+03:00",
    "id": "dcf9752855e543a391fd08ec13328ed3",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/f860f9fe94574d729c87f81cea222b46?key_for_bid=dcf9752855e543a391fd08ec13328ed3"
  }
}

See the Bid.participationUrl in the response. Similar, but different, URL can be retrieved for other participants:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f?acc_token=cbef7d4282894ae9b51eae637d97b2c6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal_part1.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f/documents/f872e90507f14f48bca386fe0eadf502?download=a6a010ec141e4c2b8d6197d3f1c68f0f",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:47.259310+03:00",
        "id": "f872e90507f14f48bca386fe0eadf502",
        "dateModified": "2017-06-24T18:05:47.259343+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "Proposal_part2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/bids/3310692784ce42bfb7cd8fac8add180f/documents/a6cf8c26526e4ccb94e23fa979c3cd58?download=ad2e984d49f541689ca0ed155adef063",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:47.260182+03:00",
        "id": "a6cf8c26526e4ccb94e23fa979c3cd58",
        "dateModified": "2017-06-24T18:05:47.260213+03:00"
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "tenderers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "date": "2017-06-24T18:05:47.258272+03:00",
    "id": "3310692784ce42bfb7cd8fac8add180f",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/f860f9fe94574d729c87f81cea222b46?key_for_bid=3310692784ce42bfb7cd8fac8add180f"
  }
}

Confirming qualification

Qualification comission registers its decision via the following call:

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/awards/9c9dd19ea23d43c49ca0d903e02c4fda?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "active",
    "complaintPeriod": {
      "startDate": "2017-06-24T18:05:47.940829+03:00",
      "endDate": "2017-06-29T00:00:00+03:00"
    },
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "bid_id": "3310692784ce42bfb7cd8fac8add180f",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-24T18:05:48.150094+03:00",
    "id": "9c9dd19ea23d43c49ca0d903e02c4fda"
  }
}

Setting contract value

By default contract value is set based on the award, but there is a possibility to set custom contract value.

If you want to lower contract value, you can insert new one into the amount field.

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 73
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "contractNumber": "contract #13111",
    "value": {
      "amount": 238
    }
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2017-06-24T18:05:48.141719+03:00",
    "awardID": "9c9dd19ea23d43c49ca0d903e02c4fda",
    "id": "be93b79784d745eaa2bb651168e319df",
    "contractID": "UA-2017-06-24-000001-1"
  }
}

200 OK response was returned. The value was modified successfully.

Setting contract signature date

There is a possibility to set custom contract signature date. You can insert appropriate date into the dateSigned field.

If this date is not set, it will be auto-generated on the date of contract registration.

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2017-06-24T18:05:49.224287+03:00"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "pending",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_first_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:48.872623+03:00",
        "id": "a34e02a52a2b457cb540baed8690a41d",
        "dateModified": "2017-06-24T18:05:48.872657+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_second_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=YTVIGEbzrT%252Bw40%252BuIMX4kUVI3Z6z9IhpEWP6SSm93Q%2FeWCrk4J%2F1oC7ABH2FqbQXXvvLR1Wix0fBRKiCT2tUBg%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:49.076192+03:00",
        "id": "32850838fb004ac1a41e6fd13d979ec3",
        "dateModified": "2017-06-24T18:05:49.076225+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2017-06-24T18:05:33.802174+03:00",
      "endDate": "2018-06-24T18:05:33.802174+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2017-06-24T18:05:49.224287+03:00",
    "date": "2017-06-24T18:05:48.141719+03:00",
    "awardID": "9c9dd19ea23d43c49ca0d903e02c4fda",
    "id": "be93b79784d745eaa2bb651168e319df",
    "contractID": "UA-2017-06-24-000001-1"
  }
}

Setting contract validity period

Setting contract validity period is optional, but if it is needed, you can set appropriate startDate and endDate.

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 106
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "period": {
      "startDate": "2017-06-24T18:05:33.802174",
      "endDate": "2018-06-24T18:05:33.802174"
    }
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2017-06-24T18:05:33.802174+03:00",
      "endDate": "2018-06-24T18:05:33.802174+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2017-06-24T18:05:48.482741+03:00",
    "date": "2017-06-24T18:05:48.141719+03:00",
    "awardID": "9c9dd19ea23d43c49ca0d903e02c4fda",
    "id": "be93b79784d745eaa2bb651168e319df",
    "contractID": "UA-2017-06-24-000001-1"
  }
}

Uploading contract documentation

You can upload contract documents. Let’s upload contract document:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 346
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=9qzqK4DvyidSzEPo1dfJWZ6t3I5BoN2agKjDQO1E2LNU%2BjfIn%2FB7X29CESoUfokhbEiwRaLe4s86tsUcLAM8BA%3D%3D",
    "title": "contract_first_document.doc",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/msword"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents/a34e02a52a2b457cb540baed8690a41d

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "contract_first_document.doc",
    "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:48.872623+03:00",
    "id": "a34e02a52a2b457cb540baed8690a41d",
    "dateModified": "2017-06-24T18:05:48.872657+03:00"
  }
}

201 Created response code and Location header confirm document was added.

Let’s see the list of contract documents:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "contract_first_document.doc",
      "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:48.872623+03:00",
      "id": "a34e02a52a2b457cb540baed8690a41d",
      "dateModified": "2017-06-24T18:05:48.872657+03:00"
    }
  ]
}

We can add another contract document:

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 343
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=fCDZpq67tU5gAGMvKiLE3GplwFpxVGQ94Ma37in7rgLaLX0BPnESCtRACNdEjgIqmZ4IitBMhMFMiKBVkrMBAQ%3D%3D",
    "title": "contract_second_document.doc",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/msword"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents/32850838fb004ac1a41e6fd13d979ec3

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "contract_second_document.doc",
    "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=YTVIGEbzrT%252Bw40%252BuIMX4kUVI3Z6z9IhpEWP6SSm93Q%2FeWCrk4J%2F1oC7ABH2FqbQXXvvLR1Wix0fBRKiCT2tUBg%253D%253D",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:49.076192+03:00",
    "id": "32850838fb004ac1a41e6fd13d979ec3",
    "dateModified": "2017-06-24T18:05:49.076225+03:00"
  }
}

201 Created response code and Location header confirm second document was uploaded.

Let’s see the list of all added contract documents:

GET /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": [
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "contract_first_document.doc",
      "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:48.872623+03:00",
      "id": "a34e02a52a2b457cb540baed8690a41d",
      "dateModified": "2017-06-24T18:05:48.872657+03:00"
    },
    {
      "hash": "md5:00000000000000000000000000000000",
      "title": "contract_second_document.doc",
      "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=YTVIGEbzrT%252Bw40%252BuIMX4kUVI3Z6z9IhpEWP6SSm93Q%2FeWCrk4J%2F1oC7ABH2FqbQXXvvLR1Wix0fBRKiCT2tUBg%253D%253D",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2017-06-24T18:05:49.076192+03:00",
      "id": "32850838fb004ac1a41e6fd13d979ec3",
      "dateModified": "2017-06-24T18:05:49.076225+03:00"
    }
  ]
}

Set contract signature date

There is a possibility to set custom contract signature date. If the date is not set it will be generated on contract registration.

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2017-06-24T18:05:49.224287+03:00"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "pending",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_first_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:48.872623+03:00",
        "id": "a34e02a52a2b457cb540baed8690a41d",
        "dateModified": "2017-06-24T18:05:48.872657+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_second_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=YTVIGEbzrT%252Bw40%252BuIMX4kUVI3Z6z9IhpEWP6SSm93Q%2FeWCrk4J%2F1oC7ABH2FqbQXXvvLR1Wix0fBRKiCT2tUBg%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:49.076192+03:00",
        "id": "32850838fb004ac1a41e6fd13d979ec3",
        "dateModified": "2017-06-24T18:05:49.076225+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2017-06-24T18:05:33.802174+03:00",
      "endDate": "2018-06-24T18:05:33.802174+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2017-06-24T18:05:49.224287+03:00",
    "date": "2017-06-24T18:05:48.141719+03:00",
    "awardID": "9c9dd19ea23d43c49ca0d903e02c4fda",
    "id": "be93b79784d745eaa2bb651168e319df",
    "contractID": "UA-2017-06-24-000001-1"
  }
}

Contract registration

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/contracts/be93b79784d745eaa2bb651168e319df?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_first_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/e31c10ac0e7740e4afa7f99bef99ae74?KeyID=661750a8&Signature=UkMdxxPVsjQDmoHg61O6un8hZZ0bNgvJsyH24hiJSJpfmrsYr4UwPoiHTpblc%2FWV5gMdjzMPIqkqhB7%2Ff4hECw%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:48.872623+03:00",
        "id": "a34e02a52a2b457cb540baed8690a41d",
        "dateModified": "2017-06-24T18:05:48.872657+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "title": "contract_second_document.doc",
        "url": "http://public.docs-sandbox.openprocurement.org/get/9c6d6cbe55724eb4bee1cb3599c0c81f?KeyID=661750a8&Signature=YTVIGEbzrT%252Bw40%252BuIMX4kUVI3Z6z9IhpEWP6SSm93Q%2FeWCrk4J%2F1oC7ABH2FqbQXXvvLR1Wix0fBRKiCT2tUBg%253D%253D",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:49.076192+03:00",
        "id": "32850838fb004ac1a41e6fd13d979ec3",
        "dateModified": "2017-06-24T18:05:49.076225+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "ДК021",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2017-06-26T18:05:33.770353+03:00",
          "endDate": "2017-06-29T18:05:33.770353+03:00"
        },
        "id": "19e00fd134d041c0a63f8c6463000392",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "suppliers": [
      {
        "contactPoint": {
          "email": "aagt@gmail.com",
          "telephone": "+380 (322) 91-69-30",
          "name": "Андрій Олексюк"
        },
        "identifier": {
          "scheme": "UA-EDR",
          "id": "00137226",
          "uri": "http://www.sc.gov.ua/"
        },
        "name": "ДКП «Книга»",
        "address": {
          "postalCode": "79013",
          "countryName": "Україна",
          "streetAddress": "вул. Островського, 34",
          "region": "м. Львів",
          "locality": "м. Львів"
        }
      }
    ],
    "contractNumber": "contract #13111",
    "period": {
      "startDate": "2017-06-24T18:05:33.802174+03:00",
      "endDate": "2018-06-24T18:05:33.802174+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2017-06-24T18:05:49.224287+03:00",
    "date": "2017-06-24T18:05:49.558156+03:00",
    "awardID": "9c9dd19ea23d43c49ca0d903e02c4fda",
    "id": "be93b79784d745eaa2bb651168e319df",
    "contractID": "UA-2017-06-24-000001-1"
  }
}

Cancelling tender

Tender creator can cancel tender anytime (except when tender has terminal status e.g. usuccesfull, canceled, complete).

The following steps should be applied:

  1. Prepare cancellation request
  2. Fill it with the protocol describing the cancellation reasons
  3. Cancel the tender with the reasons prepared.

Only the request that has been activated (3rd step above) has power to cancel tender. I.e. you have to not only prepare cancellation request but to activate it as well.

See Cancellation data structure for details.

Preparing the cancellation request

You should pass reason, status defaults to pending. id is autogenerated and passed in the Location header of response.

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 43
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "reason": "cancellation reason"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f

{
  "data": {
    "date": "2017-06-24T18:05:49.793113+03:00",
    "status": "pending",
    "reason": "cancellation reason",
    "cancellationOf": "tender",
    "id": "0aca5cea49bb4920a8a87e612d66e71f"
  }
}

Filling cancellation with protocol and supplementary documentation

Upload the file contents

POST /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f/documents?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 330
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/4bd2e91062254d74a990c995d6719520?KeyID=661750a8&Signature=0gB6Wy%2Fn%2BbGhYKC4M%2BQFpvH4dWpWzX8QZiWPUFK4141tzbWHgDxd%2F87tVq6VNuQhgBCILeC7JxEt83TV7kkQCw%3D%3D",
    "title": "Notice.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f/documents/983fbaec73944ee08f164fc7509b08cf

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/4bd2e91062254d74a990c995d6719520?KeyID=661750a8&Signature=NxILJjleO2npi69tx2mI5sMSOoeNG9mzxsTBzxZ1mhZvaastN4SFA3fc0eXXC%2FbgR1OuOp0A%2FwM92d1va5G6Aw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:49.957752+03:00",
    "id": "983fbaec73944ee08f164fc7509b08cf",
    "dateModified": "2017-06-24T18:05:49.957786+03:00"
  }
}

Change the document description and other properties

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f/documents/983fbaec73944ee08f164fc7509b08cf?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 48
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "description": "Changed description"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "Changed description",
    "title": "Notice.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/4bd2e91062254d74a990c995d6719520?KeyID=661750a8&Signature=NxILJjleO2npi69tx2mI5sMSOoeNG9mzxsTBzxZ1mhZvaastN4SFA3fc0eXXC%2FbgR1OuOp0A%2FwM92d1va5G6Aw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:49.957752+03:00",
    "id": "983fbaec73944ee08f164fc7509b08cf",
    "dateModified": "2017-06-24T18:05:49.957786+03:00"
  }
}

Upload new version of the document

PUT /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f/documents/983fbaec73944ee08f164fc7509b08cf?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 328
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "url": "http://public.docs-sandbox.openprocurement.org/get/22c2b92973b04983b1501fbeda704937?KeyID=661750a8&Signature=EIO72nQlP95waLIywONgNcx6z9YbXj5KEXzTyzH%2BafB9fUazMQpMh6TUSYiUAH2wEAWnC2Sh6Nw%2Fx1HSiY8PCA%3D%3D",
    "title": "Notice-2.pdf",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pdf"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "description": "Changed description",
    "title": "Notice-2.pdf",
    "url": "http://public.docs-sandbox.openprocurement.org/get/22c2b92973b04983b1501fbeda704937?KeyID=661750a8&Signature=0YVB0DgHToQtqYkQ5iX3tpE3G59WbWJ3AZ7GZ%252B2DtjopztA1UU%252BPoXxJJ3GxOjZfuEMAME5umeTrIkYJqVp9Cw%253D%253D",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2017-06-24T18:05:49.957752+03:00",
    "id": "983fbaec73944ee08f164fc7509b08cf",
    "dateModified": "2017-06-24T18:05:50.300324+03:00"
  }
}

Activating the request and cancelling tender

PATCH /api/2.3/tenders/f860f9fe94574d729c87f81cea222b46/cancellations/0aca5cea49bb4920a8a87e612d66e71f?acc_token=b84904c40e484b2e9be9af92d1cca8ae HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "status": "active"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "status": "active",
    "documents": [
      {
        "hash": "md5:00000000000000000000000000000000",
        "description": "Changed description",
        "title": "Notice.pdf",
        "url": "http://public.docs-sandbox.openprocurement.org/get/4bd2e91062254d74a990c995d6719520?KeyID=661750a8&Signature=NxILJjleO2npi69tx2mI5sMSOoeNG9mzxsTBzxZ1mhZvaastN4SFA3fc0eXXC%2FbgR1OuOp0A%2FwM92d1va5G6Aw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:49.957752+03:00",
        "id": "983fbaec73944ee08f164fc7509b08cf",
        "dateModified": "2017-06-24T18:05:49.957786+03:00"
      },
      {
        "hash": "md5:00000000000000000000000000000000",
        "description": "Changed description",
        "title": "Notice-2.pdf",
        "url": "http://public.docs-sandbox.openprocurement.org/get/22c2b92973b04983b1501fbeda704937?KeyID=661750a8&Signature=0YVB0DgHToQtqYkQ5iX3tpE3G59WbWJ3AZ7GZ%252B2DtjopztA1UU%252BPoXxJJ3GxOjZfuEMAME5umeTrIkYJqVp9Cw%253D%253D",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2017-06-24T18:05:49.957752+03:00",
        "id": "983fbaec73944ee08f164fc7509b08cf",
        "dateModified": "2017-06-24T18:05:50.300324+03:00"
      }
    ],
    "reason": "cancellation reason",
    "date": "2017-06-24T18:05:50.509588+03:00",
    "cancellationOf": "tender",
    "id": "0aca5cea49bb4920a8a87e612d66e71f"
  }
}