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

{
  "data": {
    "tenderPeriod": {
      "endDate": "2016-06-24T15:29:31.511759"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2016-06-17T15:29:31.511759"
    },
    "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": "CPV",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759",
          "endDate": "2016-06-15T15:29:31.511759"
        },
        "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/a4f89b85bdc041f080c73ca5b06ee953

{
  "access": {
    "token": "be391cdea4bf4d04b9794dc15d5f4b41"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-06-10-000001",
    "tenderPeriod": {
      "startDate": "2016-06-17T15:29:31.511759+03:00",
      "endDate": "2016-06-24T15:29:31.511759+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-06-17T15:29:31.511759+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": "2016-06-10T15:29:48.639408+03:00",
      "endDate": "2016-06-17T15:29:31.511759+03:00"
    },
    "owner": "broker",
    "dateModified": "2016-06-10T15:29:48.644410+03:00",
    "id": "a4f89b85bdc041f080c73ca5b06ee953",
    "awardCriteria": "lowestCost"
  }
}

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/a4f89b85bdc041f080c73ca5b06ee953 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",
    "tenderID": "UA-2016-06-10-000001",
    "tenderPeriod": {
      "startDate": "2016-06-17T15:29:31.511759+03:00",
      "endDate": "2016-06-24T15:29:31.511759+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-06-17T15:29:31.511759+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": "2016-06-10T15:29:48.639408+03:00",
      "endDate": "2016-06-17T15:29:31.511759+03:00"
    },
    "owner": "broker",
    "dateModified": "2016-06-10T15:29:48.644410+03:00",
    "id": "a4f89b85bdc041f080c73ca5b06ee953",
    "awardCriteria": "lowestCost"
  }
}

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: 4152
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": "8eca503285e84092b5f290acb9021b4b",
        "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": "2016-06-17T15:29:31.512778"
    },
    "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": "CPV",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "8eca503285e84092b5f290acb9021b4b",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "tenderPeriod": {
      "endDate": "2016-06-24T15:29:31.512778"
    }
  }
}


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

{
  "access": {
    "token": "7a30ee57d5c64c9b8be04e9a88083a28"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-06-10-000002",
    "tenderPeriod": {
      "startDate": "2016-06-17T15:29:31.512778+03:00",
      "endDate": "2016-06-24T15:29:31.512778+03:00"
    },
    "title": "[ТЕСТУВАННЯ] футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "description_en": "Cases with state awards",
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "description_ru": "футляры к государственным наградам",
        "id": "8eca503285e84092b5f290acb9021b4b",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "awardCriteria": "lowestCost",
    "next_check": "2016-06-17T15:29:31.512778+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": "м. Київ"
      }
    },
    "title_ru": "[ТЕСТИРОВАНИЕ] футляры к государственным наградам",
    "enquiryPeriod": {
      "startDate": "2016-06-10T15:29:48.908243+03:00",
      "endDate": "2016-06-17T15:29:31.512778+03:00"
    },
    "owner": "broker",
    "dateModified": "2016-06-10T15:29:48.915363+03:00",
    "mode": "test",
    "title_en": "[TESTING] Cases with state awards",
    "id": "84d69ce1f311425c92a7be4053d877b8",
    "features": [
      {
        "code": "OCDS-123454-AIR-INTAKE",
        "description": "Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
        "title": "Потужність всмоктування",
        "enum": [
          {
            "value": 0.1,
            "title": "До 1000 Вт"
          },
          {
            "value": 0.15,
            "title": "Більше 1000 Вт"
          }
        ],
        "title_en": "Air Intake",
        "relatedItem": "8eca503285e84092b5f290acb9021b4b",
        "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"
      }
    ]
  }
}

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=2016-06-10T15%3A29%3A48.644410%2B03%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=2016-06-10T15%3A29%3A48.644410%2B03%3A00",
    "offset": "2016-06-10T15:29:48.644410+03:00"
  },
  "data": [
    {
      "id": "a4f89b85bdc041f080c73ca5b06ee953",
      "dateModified": "2016-06-10T15:29:48.644410+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/a4f89b85bdc041f080c73ca5b06ee953?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 75
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "tenderPeriod": {
      "endDate": "2016-06-25T15:29:59.225162+03:00"
    }
  }
}


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

{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "tenderID": "UA-2016-06-10-000001",
    "tenderPeriod": {
      "startDate": "2016-06-17T15:29:31.511759+03:00",
      "endDate": "2016-06-25T15:29:59.225162+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-06-17T15:29:31.511759+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": "2016-06-10T15:29:48.639408+03:00",
      "endDate": "2016-06-17T15:29:31.511759+03:00"
    },
    "owner": "broker",
    "dateModified": "2016-06-10T15:29:49.285172+03:00",
    "id": "a4f89b85bdc041f080c73ca5b06ee953",
    "awardCriteria": "lowestCost"
  }
}

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=2016-06-10T15%3A29%3A49.111514%2B03%3A00",
    "uri": "http://api-sandbox.openprocurement.org/api/2.3/tenders?offset=2016-06-10T15%3A29%3A49.111514%2B03%3A00",
    "offset": "2016-06-10T15:29:49.111514+03:00"
  },
  "data": [
    {
      "id": "a4f89b85bdc041f080c73ca5b06ee953",
      "dateModified": "2016-06-10T15:29:48.644410+03:00"
    },
    {
      "id": "e6921787bfdc439a805549abe3305be4",
      "dateModified": "2016-06-10T15:29:49.111514+03:00"
    }
  ]
}

Procuring entity can set bid guarantee:

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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",
    "tenderID": "UA-2016-06-10-000001",
    "tenderPeriod": {
      "startDate": "2016-06-17T15:29:31.511759+03:00",
      "endDate": "2016-06-25T15:29:59.225162+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-06-17T15:29:31.511759+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": "2016-06-10T15:29:48.639408+03:00",
      "endDate": "2016-06-17T15:29:31.511759+03:00"
    },
    "owner": "broker",
    "dateModified": "2016-06-10T15:29:49.464237+03:00",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "id": "a4f89b85bdc041f080c73ca5b06ee953",
    "awardCriteria": "lowestCost"
  }
}

Uploading documentation

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

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 186
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy575636613392$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.569824+03:00",
    "id": "6d900d7c8e584ff99c734991cfbb7137",
    "dateModified": "2016-06-10T15:29:49.569872+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/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.569824+03:00",
    "previousVersions": [],
    "id": "6d900d7c8e584ff99c734991cfbb7137",
    "dateModified": "2016-06-10T15:29:49.569872+03:00"
  }
}

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

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 193
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy176287917142$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "AwardCriteria.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=9ef24d6aa3334caca68d2a0bf740fe09",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.993070+03:00",
    "id": "2fc2e39b222b4c74b94738702188424d",
    "dateModified": "2016-06-10T15:29:49.993111+03:00"
  }
}

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

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


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

{
  "data": [
    {
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:49.569824+03:00",
      "documentType": "technicalSpecifications",
      "id": "6d900d7c8e584ff99c734991cfbb7137",
      "dateModified": "2016-06-10T15:29:49.569872+03:00"
    },
    {
      "title": "AwardCriteria.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=9ef24d6aa3334caca68d2a0bf740fe09",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:49.993070+03:00",
      "id": "2fc2e39b222b4c74b94738702188424d",
      "dateModified": "2016-06-10T15:29:49.993111+03:00"
    }
  ]
}

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

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.569824+03:00",
    "documentType": "technicalSpecifications",
    "id": "6d900d7c8e584ff99c734991cfbb7137",
    "dateModified": "2016-06-10T15:29:49.569872+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/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": {
    "description": "document description modified",
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.569824+03:00",
    "documentType": "technicalSpecifications",
    "id": "6d900d7c8e584ff99c734991cfbb7137",
    "dateModified": "2016-06-10T15:29:49.569872+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/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 196
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy722822145083$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "AwardCriteria-2.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=db7e8c19fdcd4c9d87b5d48a20cbaa78",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:49.993070+03:00",
    "id": "2fc2e39b222b4c74b94738702188424d",
    "dateModified": "2016-06-10T15:29:50.188364+03:00"
  }
}

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

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


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

{
  "data": [
    {
      "description": "document description modified",
      "title": "Notice.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:49.569824+03:00",
      "documentType": "technicalSpecifications",
      "id": "6d900d7c8e584ff99c734991cfbb7137",
      "dateModified": "2016-06-10T15:29:49.569872+03:00"
    },
    {
      "title": "AwardCriteria-2.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=db7e8c19fdcd4c9d87b5d48a20cbaa78",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:49.993070+03:00",
      "id": "2fc2e39b222b4c74b94738702188424d",
      "dateModified": "2016-06-10T15:29:50.188364+03:00"
    }
  ]
}

Enquiries

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

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/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/a4f89b85bdc041f080c73ca5b06ee953/questions/8bbfd1aa8c2e42d49ddf6632232fbb45

{
  "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": "2016-06-10T15:29:50.326138+03:00",
    "id": "8bbfd1aa8c2e42d49ddf6632232fbb45",
    "questionOf": "tender"
  }
}

Procuring entity can answer them:

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/questions/8bbfd1aa8c2e42d49ddf6632232fbb45?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність",
    "date": "2016-06-10T15:29:50.326138+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "8bbfd1aa8c2e42d49ddf6632232fbb45",
    "questionOf": "tender"
  }
}

And one can retrieve the questions list:

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


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

{
  "data": [
    {
      "description": "Просимо додати таблицю потрібної калорійності харчування",
      "title": "Калорійність",
      "date": "2016-06-10T15:29:50.326138+03:00",
      "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
      "id": "8bbfd1aa8c2e42d49ddf6632232fbb45",
      "questionOf": "tender"
    }
  ]
}

And individual answer:

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


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

{
  "data": {
    "description": "Просимо додати таблицю потрібної калорійності харчування",
    "title": "Калорійність",
    "date": "2016-06-10T15:29:50.326138+03:00",
    "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
    "id": "8bbfd1aa8c2e42d49ddf6632232fbb45",
    "questionOf": "tender"
  }
}

Registering bid

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/a4f89b85bdc041f080c73ca5b06ee953/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/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50

{
  "access": {
    "token": "8bcebdc715e7438495372895e1d5053b"
  },
  "data": {
    "date": "2016-06-10T15:29:50.796753+03:00",
    "status": "draft",
    "id": "fa1788e6a7f84d56939ef89b278a2c50",
    "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/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50?acc_token=8bcebdc715e7438495372895e1d5053b 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": "2016-06-10T15:29:50.796753+03:00",
    "status": "active",
    "id": "fa1788e6a7f84d56939ef89b278a2c50",
    "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/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50/documents?acc_token=8bcebdc715e7438495372895e1d5053b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 188
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy466113014543$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "title": "Proposal.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50/documents/a0be9b1e19f943349775957b2f1ac64c?download=aa0ba2aabb864c2882559e04388a1a7d",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:51.098625+03:00",
    "id": "a0be9b1e19f943349775957b2f1ac64c",
    "dateModified": "2016-06-10T15:29:51.098663+03:00"
  }
}

It is possible to check the uploaded documents:

GET /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50/documents?acc_token=8bcebdc715e7438495372895e1d5053b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "Proposal.pdf",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50/documents/a0be9b1e19f943349775957b2f1ac64c?download=aa0ba2aabb864c2882559e04388a1a7d",
      "format": "application/pdf",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:51.098625+03:00",
      "id": "a0be9b1e19f943349775957b2f1ac64c",
      "dateModified": "2016-06-10T15:29:51.098663+03:00"
    }
  ]
}

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

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

{
  "data": {
    "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/a4f89b85bdc041f080c73ca5b06ee953/bids/7f89957a3dbb43ccbddb1b821b0fff3d

{
  "access": {
    "token": "c53478d3b8a4462b87416156a5dc206d"
  },
  "data": {
    "date": "2016-06-10T15:29:51.357653+03:00",
    "status": "active",
    "id": "7f89957a3dbb43ccbddb1b821b0fff3d",
    "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": "м. Львів"
        }
      }
    ]
  }
}

Auction

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

GET /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953 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/a4f89b85bdc041f080c73ca5b06ee953",
    "enquiryPeriod": {
      "startDate": "2016-05-27T15:29:31.511759+03:00",
      "endDate": "2016-06-03T15:29:31.511759+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2016-06-10T16:05:31.511759+03:00",
    "awardCriteria": "lowestCost",
    "questions": [
      {
        "description": "Просимо додати таблицю потрібної калорійності харчування",
        "title": "Калорійність",
        "date": "2016-06-10T15:29:50.326138+03:00",
        "answer": "Таблицю додано в файлі \"Kalorijnist.xslx\"",
        "id": "8bbfd1aa8c2e42d49ddf6632232fbb45",
        "questionOf": "tender"
      }
    ],
    "owner": "broker",
    "id": "a4f89b85bdc041f080c73ca5b06ee953",
    "guarantee": {
      "currency": "USD",
      "amount": 8.0
    },
    "documents": [
      {
        "description": "document description modified",
        "title": "Notice.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/6d900d7c8e584ff99c734991cfbb7137?download=e498e2079def4c68b93b7f08cbb62743",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:49.569824+03:00",
        "documentType": "technicalSpecifications",
        "id": "6d900d7c8e584ff99c734991cfbb7137",
        "dateModified": "2016-06-10T15:29:49.569872+03:00"
      },
      {
        "title": "AwardCriteria.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=9ef24d6aa3334caca68d2a0bf740fe09",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:49.993070+03:00",
        "id": "2fc2e39b222b4c74b94738702188424d",
        "dateModified": "2016-06-10T15:29:49.993111+03:00"
      },
      {
        "title": "AwardCriteria-2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/documents/2fc2e39b222b4c74b94738702188424d?download=db7e8c19fdcd4c9d87b5d48a20cbaa78",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:49.993070+03:00",
        "id": "2fc2e39b222b4c74b94738702188424d",
        "dateModified": "2016-06-10T15:29:50.188364+03:00"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderID": "UA-2016-06-10-000001",
    "dateModified": "2016-06-10T15:29:51.835198+03:00",
    "status": "active.auction",
    "tenderPeriod": {
      "startDate": "2016-06-03T15:29:31.511759+03:00",
      "endDate": "2016-06-10T15:29:31.511759+03:00"
    },
    "auctionPeriod": {
      "startDate": "2016-06-10T15:29:31.511759+03:00",
      "shouldStartAfter": "2016-06-10T15:29:31.511759+03:00"
    },
    "procurementMethodType": "belowThreshold",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "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 bidders can find out their participation URLs via their bids:

GET /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50?acc_token=8bcebdc715e7438495372895e1d5053b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "status": "active",
    "documents": [
      {
        "title": "Proposal.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/fa1788e6a7f84d56939ef89b278a2c50/documents/a0be9b1e19f943349775957b2f1ac64c?download=aa0ba2aabb864c2882559e04388a1a7d",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:51.098625+03:00",
        "id": "a0be9b1e19f943349775957b2f1ac64c",
        "dateModified": "2016-06-10T15:29:51.098663+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": "2016-06-10T15:29:50.796753+03:00",
    "id": "fa1788e6a7f84d56939ef89b278a2c50",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/a4f89b85bdc041f080c73ca5b06ee953?key_for_bid=fa1788e6a7f84d56939ef89b278a2c50"
  }
}

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

GET /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/bids/7f89957a3dbb43ccbddb1b821b0fff3d?acc_token=c53478d3b8a4462b87416156a5dc206d HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "status": "active",
    "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": "2016-06-10T15:29:51.357653+03:00",
    "id": "7f89957a3dbb43ccbddb1b821b0fff3d",
    "participationUrl": "http://auction-sandbox.openprocurement.org/tenders/a4f89b85bdc041f080c73ca5b06ee953?key_for_bid=7f89957a3dbb43ccbddb1b821b0fff3d"
  }
}

Confirming qualification

Qualification comission registers its decision via the following call:

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/awards/a4f3a7ab4a2440a1ad986f6698050486?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": "2016-06-10T15:29:52.326011+03:00",
      "endDate": "2016-06-14T15:29:52.680519+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": "7f89957a3dbb43ccbddb1b821b0fff3d",
    "value": {
      "currency": "UAH",
      "amount": 499.0,
      "valueAddedTaxIncluded": true
    },
    "date": "2016-06-10T15:29:52.680478+03:00",
    "id": "a4f3a7ab4a2440a1ad986f6698050486"
  }
}

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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "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": "2016-06-10T15:29:53.062509+03:00",
    "awardID": "a4f3a7ab4a2440a1ad986f6698050486",
    "id": "80d26391f3474fe9bf390201639cca05",
    "contractID": "UA-2016-06-10-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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2016-06-10T15:29:54.196737+03:00"
  }
}


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

{
  "data": {
    "status": "pending",
    "documents": [
      {
        "title": "contract_first_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:53.712743+03:00",
        "id": "c2718742f2c64c21a734438905ad8b21",
        "dateModified": "2016-06-10T15:29:53.712792+03:00"
      },
      {
        "title": "contract_second_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77?download=3536436229e14926b04121cbaa433b24",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:54.005192+03:00",
        "id": "430bef40925b4c1e87430cc1c977ce77",
        "dateModified": "2016-06-10T15:29:54.005235+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "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": "2016-06-10T15:29:31.512778+03:00",
      "endDate": "2017-06-10T15:29:31.512778+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-06-10T15:29:54.196737+03:00",
    "date": "2016-06-10T15:29:54.339565+03:00",
    "awardID": "a4f3a7ab4a2440a1ad986f6698050486",
    "id": "80d26391f3474fe9bf390201639cca05",
    "contractID": "UA-2016-06-10-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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 106
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "period": {
      "startDate": "2016-06-10T15:29:31.512778",
      "endDate": "2017-06-10T15:29:31.512778"
    }
  }
}


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

{
  "data": {
    "status": "pending",
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "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": "2016-06-10T15:29:31.512778+03:00",
      "endDate": "2017-06-10T15:29:31.512778+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-06-10T15:29:53.167855+03:00",
    "date": "2016-06-10T15:29:53.492000+03:00",
    "awardID": "a4f3a7ab4a2440a1ad986f6698050486",
    "id": "80d26391f3474fe9bf390201639cca05",
    "contractID": "UA-2016-06-10-000001-1"
  }
}

Uploading contract documentation

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

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 208
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy0537317567605$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21

{
  "data": {
    "title": "contract_first_document.doc",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:53.712743+03:00",
    "id": "c2718742f2c64c21a734438905ad8b21",
    "dateModified": "2016-06-10T15:29:53.712792+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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "contract_first_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:53.712743+03:00",
      "id": "c2718742f2c64c21a734438905ad8b21",
      "dateModified": "2016-06-10T15:29:53.712792+03:00"
    }
  ]
}

We can add another contract document:

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 207
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy430480536974$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77

{
  "data": {
    "title": "contract_second_document.doc",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77?download=3536436229e14926b04121cbaa433b24",
    "format": "application/msword",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:54.005192+03:00",
    "id": "430bef40925b4c1e87430cc1c977ce77",
    "dateModified": "2016-06-10T15:29:54.005235+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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.openprocurement.org


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

{
  "data": [
    {
      "title": "contract_first_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:53.712743+03:00",
      "id": "c2718742f2c64c21a734438905ad8b21",
      "dateModified": "2016-06-10T15:29:53.712792+03:00"
    },
    {
      "title": "contract_second_document.doc",
      "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77?download=3536436229e14926b04121cbaa433b24",
      "format": "application/msword",
      "documentOf": "tender",
      "datePublished": "2016-06-10T15:29:54.005192+03:00",
      "id": "430bef40925b4c1e87430cc1c977ce77",
      "dateModified": "2016-06-10T15:29:54.005235+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/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 60
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
  "data": {
    "dateSigned": "2016-06-10T15:29:54.196737+03:00"
  }
}


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

{
  "data": {
    "status": "pending",
    "documents": [
      {
        "title": "contract_first_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:53.712743+03:00",
        "id": "c2718742f2c64c21a734438905ad8b21",
        "dateModified": "2016-06-10T15:29:53.712792+03:00"
      },
      {
        "title": "contract_second_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77?download=3536436229e14926b04121cbaa433b24",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:54.005192+03:00",
        "id": "430bef40925b4c1e87430cc1c977ce77",
        "dateModified": "2016-06-10T15:29:54.005235+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "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": "2016-06-10T15:29:31.512778+03:00",
      "endDate": "2017-06-10T15:29:31.512778+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-06-10T15:29:54.196737+03:00",
    "date": "2016-06-10T15:29:54.339565+03:00",
    "awardID": "a4f3a7ab4a2440a1ad986f6698050486",
    "id": "80d26391f3474fe9bf390201639cca05",
    "contractID": "UA-2016-06-10-000001-1"
  }
}

Contract registration

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": [
      {
        "title": "contract_first_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/c2718742f2c64c21a734438905ad8b21?download=699b6834ead2453db19407dc7850ba27",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:53.712743+03:00",
        "id": "c2718742f2c64c21a734438905ad8b21",
        "dateModified": "2016-06-10T15:29:53.712792+03:00"
      },
      {
        "title": "contract_second_document.doc",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/contracts/80d26391f3474fe9bf390201639cca05/documents/430bef40925b4c1e87430cc1c977ce77?download=3536436229e14926b04121cbaa433b24",
        "format": "application/msword",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:54.005192+03:00",
        "id": "430bef40925b4c1e87430cc1c977ce77",
        "dateModified": "2016-06-10T15:29:54.005235+03:00"
      }
    ],
    "items": [
      {
        "description": "футляри до державних нагород",
        "classification": {
          "scheme": "CPV",
          "description": "Cartons",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "deliveryAddress": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "deliveryDate": {
          "startDate": "2016-06-12T15:29:31.511759+03:00",
          "endDate": "2016-06-15T15:29:31.511759+03:00"
        },
        "id": "bc8a07adf2df4c98aa22e8d598eb06d3",
        "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": "2016-06-10T15:29:31.512778+03:00",
      "endDate": "2017-06-10T15:29:31.512778+03:00"
    },
    "value": {
      "currency": "UAH",
      "amount": 238.0,
      "valueAddedTaxIncluded": true
    },
    "dateSigned": "2016-06-10T15:29:54.196737+03:00",
    "date": "2016-06-10T15:29:54.695794+03:00",
    "awardID": "a4f3a7ab4a2440a1ad986f6698050486",
    "id": "80d26391f3474fe9bf390201639cca05",
    "contractID": "UA-2016-06-10-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/a4f89b85bdc041f080c73ca5b06ee953/cancellations?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c

{
  "data": {
    "date": "2016-06-10T15:29:55.073636+03:00",
    "status": "pending",
    "reason": "cancellation reason",
    "cancellationOf": "tender",
    "id": "b7c4eedd2b4f4da7860b562373f4fb4c"
  }
}

Filling cancellation with protocol and supplementary documentation

Upload the file contents

POST /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 186
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy914463974531$
Host: api-sandbox.openprocurement.org


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6

{
  "data": {
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?download=e51f1106c7d1477b9b2188aac69930b8",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:55.272573+03:00",
    "id": "94568da73be1401ea6453e14cf1ff2b6",
    "dateModified": "2016-06-10T15:29:55.272610+03:00"
  }
}

Change the document description and other properties

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": {
    "description": "Changed description",
    "title": "Notice.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?download=e51f1106c7d1477b9b2188aac69930b8",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:55.272573+03:00",
    "id": "94568da73be1401ea6453e14cf1ff2b6",
    "dateModified": "2016-06-10T15:29:55.272610+03:00"
  }
}

Upload new version of the document

PUT /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 189
Content-Type: multipart/form-data; boundary=----------a_BoUnDaRy585410364074$
Host: api-sandbox.openprocurement.org


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

{
  "data": {
    "description": "Changed description",
    "title": "Notice-2.pdf",
    "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?download=eff6fba4d856460f8507708d8903ac58",
    "format": "application/pdf",
    "documentOf": "tender",
    "datePublished": "2016-06-10T15:29:55.272573+03:00",
    "id": "94568da73be1401ea6453e14cf1ff2b6",
    "dateModified": "2016-06-10T15:29:55.680896+03:00"
  }
}

Activating the request and cancelling tender

PATCH /api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c?acc_token=be391cdea4bf4d04b9794dc15d5f4b41 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": [
      {
        "description": "Changed description",
        "title": "Notice.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?download=e51f1106c7d1477b9b2188aac69930b8",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:55.272573+03:00",
        "id": "94568da73be1401ea6453e14cf1ff2b6",
        "dateModified": "2016-06-10T15:29:55.272610+03:00"
      },
      {
        "description": "Changed description",
        "title": "Notice-2.pdf",
        "url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/a4f89b85bdc041f080c73ca5b06ee953/cancellations/b7c4eedd2b4f4da7860b562373f4fb4c/documents/94568da73be1401ea6453e14cf1ff2b6?download=eff6fba4d856460f8507708d8903ac58",
        "format": "application/pdf",
        "documentOf": "tender",
        "datePublished": "2016-06-10T15:29:55.272573+03:00",
        "id": "94568da73be1401ea6453e14cf1ff2b6",
        "dateModified": "2016-06-10T15:29:55.680896+03:00"
      }
    ],
    "reason": "cancellation reason",
    "date": "2016-06-10T15:29:55.073636+03:00",
    "cancellationOf": "tender",
    "id": "b7c4eedd2b4f4da7860b562373f4fb4c"
  }
}