Example for Tender

Tender ownership change

Let’s view transfer example for tender.

Tender creation

At first let’s create a tender:

Request

POST /api/2.5/tenders?opt_pretty=1 HTTP/1.0
Authorization: Bearer brokerx
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "title": "футляри до державних нагород",
    "mainProcurementCategory": "goods",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "locality": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "telephone": "+380950000000",
        "email": "example@email.com",
        "iban": "111111111111111",
        "authorizedBy": "Статут компанії",
        "position": "Генеральний директор"
      }
    },
    "value": {
      "amount": 500,
      "currency": "UAH"
    },
    "items": [
      {
        "id": "ffffffffffffffffffffffffffffffff",
        "description": "футляри до державних нагород",
        "description_en": "Cases with state awards",
        "description_ru": "футляры к государственным наградам",
        "classification": {
          "scheme": "ДК021",
          "id": "44617100-9",
          "description": "Cartons"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "unit": {
          "name": "кілограм",
          "code": "KGM",
          "value": {
            "amount": 6
          }
        },
        "quantity": 5
      }
    ],
    "enquiryPeriod": {
      "endDate": "2023-10-17T00:00:00+02:00"
    },
    "tenderPeriod": {
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "procurementMethodType": "belowThreshold",
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "code": "prepayment",
        "type": "financing",
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1,
        "percentage": 45.55
      },
      {
        "title": "deliveryOfGoods",
        "code": "postpayment",
        "type": "financing",
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2,
        "percentage": 54.45
      }
    ],
    "contractTemplateName": "00000000.0002.01"
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  }
}

Response

HTTP/1.0 201 Created
Content-Type: application/json
Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/c710ed7a14274e5c969285e368125b9c

{
  "data": {
    "mainProcurementCategory": "goods",
    "contractTemplateName": "00000000.0002.01",
    "title": "футляри до державних нагород",
    "status": "draft",
    "awardCriteria": "lowestCost",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderPeriod": {
      "startDate": "2023-10-17T00:00:00+02:00",
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "type": "financing",
        "code": "prepayment",
        "percentage": 45.55,
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1
      },
      {
        "id": "e28454781be74f4da97ebc01039416b5",
        "title": "deliveryOfGoods",
        "type": "financing",
        "code": "postpayment",
        "percentage": 54.45,
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2
      }
    ],
    "procurementMethodType": "belowThreshold",
    "enquiryPeriod": {
      "endDate": "2023-10-17T00:00:00+02:00",
      "startDate": "2023-10-10T01:00:00+03:00",
      "clarificationsUntil": "2023-10-19T00:00:00+03:00"
    },
    "items": [
      {
        "id": "ffffffffffffffffffffffffffffffff",
        "description": "футляри до державних нагород",
        "description_en": "Cases with state awards",
        "description_ru": "футляры к государственным наградам",
        "unit": {
          "name": "кілограм",
          "value": {
            "amount": 6.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
          },
          "code": "KGM"
        },
        "quantity": 5.0,
        "classification": {
          "description": "Cartons",
          "scheme": "ДК021",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ]
      }
    ],
    "tenderID": "UA-2023-10-10-000001-a",
    "owner": "brokerx",
    "procurementMethod": "open",
    "submissionMethod": "electronicAuction",
    "date": "2023-10-10T01:00:00+03:00",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "id": "c710ed7a14274e5c969285e368125b9c"
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  },
  "access": {
    "token": "65fcb9f8dae2415bafa9c76b76f77151",
    "transfer": "6d25791d89994de4bb70f222c937647f"
  }
}

broker is current tender’s owner.

Note that response’s access section contains a transfer key which is used to change tender ownership.

After tender’s registration in CDB broker has to provide its customer with transfer key.

Transfer creation

Broker that is going to become new tender owner should create a Transfer.

Request

POST /api/2.5/transfers HTTP/1.0
Authorization: Bearer broker1
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {}
}

Response

HTTP/1.0 201 Created
Content-Type: application/json

{
  "data": {
    "date": "2023-10-10T01:00:00+03:00",
    "id": "5f24c8f5b5224d2b9054cb192eee8b7c"
  },
  "access": {
    "token": "ea357a658e9a472c9f73726b3de03f0b",
    "transfer": "8bd78defc2914503b40f3d0751aa55e5"
  }
}

Transfer object contains new access token and new transfer token for the object that will be transferred to new broker.

Transfer can be retrieved by id:

Request

GET /api/2.5/transfers/5f24c8f5b5224d2b9054cb192eee8b7c HTTP/1.0
Authorization: Bearer broker1
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "date": "2023-10-10T01:00:00+03:00",
    "id": "5f24c8f5b5224d2b9054cb192eee8b7c"
  }
}

Changing tender’s owner

An ability to change tender’s ownership depends on tender’s status:

Allowed

Not Alowwed

belowThreshold

active.enquiries

active.tendering

active.auction

active.qualification

active.awarded

complete

cancelled

unsuccessful

aboveThresholdUA

active.tendering

active.auction

active.qualification

active.awarded

complete

cancelled

unsuccessful

aboveThresholdEU

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.auction

active.qualification

active.awarded

complete

cancelled

unsuccessful

aboveThresholdUA.defense

active.tendering

active.auction

active.qualification

active.awarded

complete

cancelled

unsuccessful

competitiveDialogueUA

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.stage2.pending

active.stage2.waiting

complete

unsuccessful

cancelled

competitiveDialogueUA.stage2

draft.stage2

active.tendering

active.auction

active.qualification

active.awarded

complete

unsuccessful

cancelled

competitiveDialogueEU

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.stage2.pending

active.stage2.waiting

complete

unsuccessful

cancelled

competitiveDialogueEU.stage2

draft.stage2

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.auction

active.qualification

active.awarded

complete

unsuccessful

cancelled

esco

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.auction

active.qualification

active.awarded

complete

unsuccessful

cancelled

closeFrameworkAgreementUA

active.tendering

active.pre-qualification

active.pre-qualification.stand-still

active.auction

active.qualification

active.qualification.stand-still

active.awarded

complete

unsuccessful

cancelled

closeFrameworkAgreementSelectionUA

draftactive.enquiries

active.tendering

active.auction

active.qualification

active.awarded

draft.pending

draft.unsuccessful

complete

unsuccessful

cancelled

reporting

active

complete

cancelled

negotiation

active

complete

cancelled

negotiation.quick

active

complete

To change tender’s ownership new broker should send POST request to appropriate /tenders/id/ with data section containing id of Transfer and transfer token received from customer:

Request

POST /api/2.5/tenders/c710ed7a14274e5c969285e368125b9c/ownership HTTP/1.0
Authorization: Bearer broker1
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "id": "5f24c8f5b5224d2b9054cb192eee8b7c",
    "transfer": "6d25791d89994de4bb70f222c937647f"
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "owner": "broker1",
    "id": "c710ed7a14274e5c969285e368125b9c"
  }
}

Updated owner value indicates that ownership is successfully changed.

Note that new broker has to provide its customer with new transfer key (generated in Transfer object).

After Transfer is applied it stores tender path in usedFor property:

Request

GET /api/2.5/transfers/5f24c8f5b5224d2b9054cb192eee8b7c HTTP/1.0
Authorization: Bearer broker1
Host: public-api-sandbox.prozorro.gov.ua

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "date": "2023-10-10T01:00:00+03:00",
    "usedFor": "/tenders/c710ed7a14274e5c969285e368125b9c",
    "id": "5f24c8f5b5224d2b9054cb192eee8b7c"
  }
}

‘Used’ Transfer can’t be applied to any other object.

Let’s try to change the tender using token received on Transfer creation:

Request

PATCH /api/2.5/tenders/c710ed7a14274e5c969285e368125b9c?acc_token=ea357a658e9a472c9f73726b3de03f0b HTTP/1.0
Authorization: Bearer broker1
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "description": "broker1 now can change the tender"
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json

{
  "data": {
    "description": "broker1 now can change the tender",
    "contractTemplateName": "00000000.0002.01",
    "date": "2023-10-10T01:00:00+03:00",
    "dateModified": "2023-10-10T01:00:00+03:00",
    "dateCreated": "2023-10-10T01:00:00+03:00",
    "tenderID": "UA-2023-10-10-000001-a",
    "status": "draft",
    "owner": "broker1",
    "title": "футляри до державних нагород",
    "mainProcurementCategory": "goods",
    "procurementMethod": "open",
    "submissionMethod": "electronicAuction",
    "awardCriteria": "lowestCost",
    "procuringEntity": {
      "name": "Державне управління справами",
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "address": {
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ",
        "region": "м. Київ",
        "postalCode": "01220",
        "countryName": "Україна"
      },
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "+0440000000"
      },
      "kind": "general",
      "signerInfo": {
        "name": "Test Testovich",
        "email": "example@email.com",
        "telephone": "+380950000000",
        "iban": "111111111111111",
        "position": "Генеральний директор",
        "authorizedBy": "Статут компанії"
      }
    },
    "value": {
      "currency": "UAH",
      "amount": 500.0,
      "valueAddedTaxIncluded": true
    },
    "tenderPeriod": {
      "startDate": "2023-10-17T00:00:00+02:00",
      "endDate": "2023-10-24T00:00:00+02:00"
    },
    "milestones": [
      {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "title": "signingTheContract",
        "type": "financing",
        "code": "prepayment",
        "percentage": 45.55,
        "duration": {
          "days": 2,
          "type": "banking"
        },
        "sequenceNumber": 1
      },
      {
        "id": "e28454781be74f4da97ebc01039416b5",
        "title": "deliveryOfGoods",
        "type": "financing",
        "code": "postpayment",
        "percentage": 54.45,
        "duration": {
          "days": 900,
          "type": "calendar"
        },
        "sequenceNumber": 2
      }
    ],
    "procurementMethodType": "belowThreshold",
    "enquiryPeriod": {
      "startDate": "2023-10-10T01:00:00+03:00",
      "clarificationsUntil": "2023-10-19T00:00:00+03:00",
      "endDate": "2023-10-17T00:00:00+02:00"
    },
    "items": [
      {
        "id": "ffffffffffffffffffffffffffffffff",
        "description": "футляри до державних нагород",
        "description_en": "Cases with state awards",
        "description_ru": "футляры к государственным наградам",
        "unit": {
          "name": "кілограм",
          "value": {
            "amount": 6.0,
            "currency": "UAH",
            "valueAddedTaxIncluded": true
          },
          "code": "KGM"
        },
        "quantity": 5.0,
        "classification": {
          "description": "Cartons",
          "scheme": "ДК021",
          "id": "44617100-9"
        },
        "additionalClassifications": [
          {
            "scheme": "ДКПП",
            "id": "17.21.1",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ]
      }
    ],
    "id": "c710ed7a14274e5c969285e368125b9c"
  },
  "config": {
    "hasAuction": true,
    "hasAwardingOrder": true,
    "hasValueRestriction": true,
    "valueCurrencyEquality": true,
    "hasPrequalification": false,
    "minBidsNumber": 1,
    "hasPreSelectionAgreement": false,
    "hasTenderComplaints": false,
    "hasAwardComplaints": false,
    "hasCancellationComplaints": false,
    "hasValueEstimation": true,
    "hasQualificationComplaints": false,
    "tenderComplainRegulation": 0,
    "qualificationComplainDuration": 0,
    "awardComplainDuration": 2,
    "cancellationComplainDuration": 0,
    "clarificationUntilDuration": 1,
    "qualificationDuration": 0,
    "minTenderingDuration": 2,
    "hasEnquiries": true,
    "minEnquiriesDuration": 3,
    "enquiryPeriodRegulation": 0,
    "restricted": false
  }
}

Pay attention that only broker with appropriate accreditation level can become new owner. Otherwise broker will be forbidden from this action.

Request

POST /api/2.5/tenders/c710ed7a14274e5c969285e368125b9c/ownership HTTP/1.0
Authorization: Bearer broker2
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "id": "0aad6f8b002e4538b7023ec9012dd86d",
    "transfer": "6d25791d89994de4bb70f222c937647f"
  }
}

Response

HTTP/1.0 403 Forbidden
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "url",
      "name": "accreditation",
      "description": "Broker Accreditation level does not permit ownership change"
    }
  ]
}

Also ownership change is allowed only if current owner has a special accreditation level that allows ownership change:

Request

POST /api/2.5/tenders/c710ed7a14274e5c969285e368125b9c/ownership HTTP/1.0
Authorization: Bearer brokerx
Content-Type: application/json
Host: lb-api-sandbox.prozorro.gov.ua

{
  "data": {
    "id": "248b22fd619947a3a79598710ddfe39d",
    "transfer": "6d25791d89994de4bb70f222c937647f"
  }
}

Response

HTTP/1.0 403 Forbidden
Content-Type: application/json

{
  "status": "error",
  "errors": [
    {
      "location": "url",
      "name": "accreditation",
      "description": "Owner Accreditation level does not permit ownership change"
    }
  ]
}