Payment milestones

Payment information can be specified via tender milestones list of Milestone objects

POST /api/2.5/tenders HTTP/1.0
Authorization: Bearer broker
Content-Length: 2730
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 5
        },
        "percentage": 45.55,
        "type": "financing"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 1,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 7
        },
        "percentage": 54.45,
        "type": "financing"
      }
    ],
    "mainProcurementCategory": "goods",
    "tenderPeriod": {
      "endDate": "2019-11-08T01:00:00+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "enquiryPeriod": {
      "endDate": "2019-11-01T01:00:00+03:00"
    },
    "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": "2019-10-27T01:00:00+03:00",
          "endDate": "2019-10-30T01:00:00+03:00"
        },
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ]
  }
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/7e23f3f26faf4146af5f668247cf04f4
{
  "access": {
    "transfer": "299d395afa1c4767a924aa4bc1d7c14d",
    "token": "1fa15f3780344958b25159593e9b4836"
  },
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 5
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "9cdfea22b0b04b33b1a653ad1301c648"
      },
      {
        "code": "postpayment",
        "sequenceNumber": 1,
        "title": "deliveryOfGoods",
        "duration": {
          "type": "calendar",
          "days": 7
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3381cdf128b840cf9921a72eaa4f3c56"
      }
    ],
    "mainProcurementCategory": "goods",
    "tenderPeriod": {
      "startDate": "2019-11-01T01:00:00+03:00",
      "endDate": "2019-11-08T01:00:00+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": "2019-10-27T01:00:00+03:00",
          "endDate": "2019-10-30T01:00:00+03:00"
        },
        "id": "6b281007ddb54da29dcfbfae47a3b1ad",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5.0
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2019-10-25T01:00:00+03:00",
    "next_check": "2019-11-01T00:00:00+02: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": "м. Київ"
      }
    },
    "awardCriteria": "lowestCost",
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-01T01:00:00+03:00"
    },
    "owner": "broker",
    "dateModified": "2019-10-25T01:00:00+03:00",
    "id": "7e23f3f26faf4146af5f668247cf04f4",
    "tenderID": "UA-2019-10-25-000001"
  }
}

Let’s update milestones:

PATCH /api/2.5/tenders/7e23f3f26faf4146af5f668247cf04f4?acc_token=1fa15f3780344958b25159593e9b4836 HTTP/1.0
Authorization: Bearer broker
Content-Length: 161
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "milestones": [
      {},
      {
        "description": "Підозрілий опис",
        "title": "anotherEvent"
      }
    ]
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "milestones": [
      {
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 5
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "9cdfea22b0b04b33b1a653ad1301c648"
      },
      {
        "code": "postpayment",
        "description": "Підозрілий опис",
        "sequenceNumber": 1,
        "title": "anotherEvent",
        "duration": {
          "type": "calendar",
          "days": 7
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3381cdf128b840cf9921a72eaa4f3c56"
      }
    ],
    "mainProcurementCategory": "goods",
    "tenderPeriod": {
      "startDate": "2019-11-01T01:00:00+03:00",
      "endDate": "2019-11-08T01:00:00+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": "2019-10-27T01:00:00+03:00",
          "endDate": "2019-10-30T01:00:00+03:00"
        },
        "id": "6b281007ddb54da29dcfbfae47a3b1ad",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5.0
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2019-10-25T01:00:00+03:00",
    "next_check": "2019-11-01T00:00:00+02: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": "м. Київ"
      }
    },
    "awardCriteria": "lowestCost",
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-01T01:00:00+03:00"
    },
    "owner": "broker",
    "dateModified": "2019-10-25T01:00:00+03:00",
    "id": "7e23f3f26faf4146af5f668247cf04f4",
    "tenderID": "UA-2019-10-25-000001"
  }
}

For multi-lot tenders every Milestone object can be connected to a specific lot

PATCH /api/2.5/tenders/7e23f3f26faf4146af5f668247cf04f4?acc_token=1fa15f3780344958b25159593e9b4836 HTTP/1.0
Authorization: Bearer broker
Content-Length: 130
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "milestones": [
      {
        "relatedLot": "db096b31c7ef4b2e95516f47a34a07e1"
      },
      {
        "relatedLot": "db096b31c7ef4b2e95516f47a34a07e1"
      }
    ]
  }
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
  "data": {
    "procurementMethod": "open",
    "status": "active.enquiries",
    "milestones": [
      {
        "relatedLot": "db096b31c7ef4b2e95516f47a34a07e1",
        "code": "prepayment",
        "sequenceNumber": 0,
        "title": "signingTheContract",
        "duration": {
          "type": "banking",
          "days": 5
        },
        "percentage": 45.55,
        "type": "financing",
        "id": "9cdfea22b0b04b33b1a653ad1301c648"
      },
      {
        "relatedLot": "db096b31c7ef4b2e95516f47a34a07e1",
        "code": "postpayment",
        "description": "Підозрілий опис",
        "sequenceNumber": 1,
        "title": "anotherEvent",
        "duration": {
          "type": "calendar",
          "days": 7
        },
        "percentage": 54.45,
        "type": "financing",
        "id": "3381cdf128b840cf9921a72eaa4f3c56"
      }
    ],
    "mainProcurementCategory": "goods",
    "tenderPeriod": {
      "startDate": "2019-11-01T01:00:00+03:00",
      "endDate": "2019-11-08T01:00:00+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": "2019-10-27T01:00:00+03:00",
          "endDate": "2019-10-30T01:00:00+03:00"
        },
        "id": "6b281007ddb54da29dcfbfae47a3b1ad",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5.0
      }
    ],
    "procurementMethodType": "belowThreshold",
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2019-10-25T01:00:00+03:00",
    "next_check": "2019-11-01T00:00:00+02: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": "м. Київ"
      }
    },
    "awardCriteria": "lowestCost",
    "enquiryPeriod": {
      "startDate": "2019-10-25T01:00:00+03:00",
      "endDate": "2019-11-01T01:00:00+03:00"
    },
    "owner": "broker",
    "dateModified": "2019-10-25T01:00:00+03:00",
    "lots": [
      {
        "status": "active",
        "description": "lot description",
        "title": "lot title",
        "minimalStep": {
          "currency": "UAH",
          "amount": 35.0,
          "valueAddedTaxIncluded": true
        },
        "value": {
          "currency": "UAH",
          "amount": 500.0,
          "valueAddedTaxIncluded": true
        },
        "date": "2019-10-25T01:00:00+03:00",
        "id": "db096b31c7ef4b2e95516f47a34a07e1"
      }
    ],
    "id": "7e23f3f26faf4146af5f668247cf04f4",
    "tenderID": "UA-2019-10-25-000001"
  }
}

Be careful, lot objects cannot be deleted while there are any connected milestones

DELETE /api/2.5/tenders/7e23f3f26faf4146af5f668247cf04f4/lots/db096b31c7ef4b2e95516f47a34a07e1?acc_token=1fa15f3780344958b25159593e9b4836 HTTP/1.0
Authorization: Bearer broker
Content-Length: 0
Host: lb-api-sandbox.prozorro.gov.ua

Response: 422 Unprocessable Entity
Content-Type: application/json; charset=UTF-8
{
  "status": "error",
  "errors": [
    {
      "description": [
        {
          "relatedLot": [
            "relatedLot should be one of the lots."
          ]
        },
        {
          "relatedLot": [
            "relatedLot should be one of the lots."
          ]
        }
      ],
      "location": "body",
      "name": "milestones"
    }
  ]
}