Welcome to openprocurement.contracting.ceasefire’s documentation!

Please report any problems or suggestions for improvement either via the mailing list or the issue tracker.

Contents:

Overview

Ceasefire contracting

Features

  • On contract activation in award, the object contract is formed in the Contracting Module component
  • For object activation in the system the owner has to use the transfer token and assign the status active.payment to the object
  • The created contract contains three milestones
  • Each milestone corresponds to certain contract terms and conditions
  • Each milestone contains dueDate corresponding to the final date until which all the indicated terms and conditions are to be fulfilled
  • In order to confirm the completion of the financing milestone conditions the Organiser is obliged to set the dateMet for identification of payment reception from the participant
  • On condition that the payment was not received the Organiser has the right to set the milestone to status notMet upon which the contract will be assigned the status pending.unsuccessful
  • In order to confirm the completion of the approval milestone conditions the Organiser has to upload the document (documentType:approvalProtocol) into the contract having provided the indications documentOf:milestone and relatedItem with the corresponding milestone identifier and to set the dateMet
  • In order to assign the notMet status to pproval mileston it is necessary to upload the document (documentType:rejectionProtocol) upon which the contract status will be changed to pending.unsuccessful
  • In order to confirm the completion of the reporting milestone conditions the Organiser has to set dateMet
  • In order to assign the notMet status to rejection milestone it is necessary to upload the document (documentType:rejectionProtocol) upon which the contract status will be changed to pending.unsuccessful
  • If dateMet precedes the dueDate, the milestone status should be changed to met, if not - to partiallyMet
  • All the actions must be carried out by the Organiser

Conventions

API accepts JSON or form-encoded content in requests. It returns JSON content in all of its responses, including errors. Only the UTF-8 character encoding is supported for both requests and responses.

All API POST and PUT requests expect a top-level object with a single element in it named data. Successful responses will mirror this format. The data element should itself be an object, containing the parameters for the request. In the case of creating a new auction, these are the fields we want to set on the auction itself.

If the request was successful, we will get a response code of 201 indicating the object was created. That response will have a data field at its top level, which will contain complete information on the new auction, including its ID.

If something went wrong during the request, we’ll get a different status code and the JSON returned will have an errors field at the top level containing a list of problems. We look at the first one and print out its message.

Main responsibilities

Project status

The project has beta status.

The source repository for this project is on GitHub: https://github.com/openprocurement/openprocurement.contracting.ceasefire

You can leave feedback by raising a new issue on the issue tracker (GitHub registration necessary).

API stability

API is relatively stable. The changes in the API are communicated via Open Procurement API maillist.

Next steps

You might find it helpful to look at the Tutorial.

Data Standard

Data standard is modelled along the Open Contracting Standard with extensions in areas that were not covered by it.

Contract

Schema

id:

uuid, auto-generated, read-only

Internal identifier for this contract.

awardID:

string, required, read-only

OpenContracting Description: The Award.id against which this contract is being issued.

contractID:

string, auto-generated, read-only

OpenContracting Description: ID of the same contract, bound to auction resource.

contractNumber:

string, optional

Contract number within the paper documentation.

title:

string, multilingual, optional

  • Ukrainian by default - Ukrainian title
  • title_en (English) - English title
  • title_ru (Russian) - Russian title

OpenContracting Description: Contract title.

description:

string, multilingual, optional

  • Ukrainian by default - Ukrainian decription
  • decription_en (English) - English decription
  • decription_ru (Russian) - Russian decription

OpenContracting Description: Contract description.

status:

string, required

OpenContracting Description: The current status of the contract.

Status Description
active.confirmation:
 
draft contract
active.payment:
payment period
active.approval:
 
the period for downloading the final Order on the privatization of the facility
active:
this contract has been signed by all the parties, and is now legally in force
active:
period for fulfillment of other conditions
pending.terminated:
 
a vaiting transition to the next status
pending.unsuccessful:
 
a vaiting transition to the next status
terminated:
this contract was signed and in force, and has now come to a close. This may be due to a successful completion of the contract or may be early termination due to some non-completion issue
unsuccessful:
this contract is unsuccessful
items:

Array of Item objects, auto-generated, read-only

OpenContracting Description: The goods, services, and any intangible outcomes in this contract.

procuringEntity:
 

Organization, optional

OpenContracting Description: The entity managing the procurement, which may be different from the buyer who is paying / using the items being procured.

suppliers:

List of Organization objects, auto-generated, read-only

Buyer. Indicates the winner of the auction whom the given contract has been signed with.

value:

Value object, auto-generated, read-only

OpenContracting Description: The total value of this contract.

dateSigned:

string, Date, auto-generated, read-only

OpenContracting Description: The date the contract was signed. In the case of multiple signatures, the date of the last signature.

documents:

Array of Document objects, optional

OpenContracting Description: All documents and attachments related to the contract, including any notices.

changes:

Array of Change objects, optional

merchandisingObject:
 

string, auto-generated, read-only

Id of related Lot

milestones:

Array of Milestone objects.

There are 3 milestones, that will be associated with contract after acquiring him active.payment status:

  • financing
  • approval
  • reporting
owner:

string, auto-generated, read-only

The entity whom the contract has been created by.

dateModified:

string, Date, auto-generated, read-only

Time, when contract was changed last time.

contractType:

string, auto-generated, read-only

Type of the contract.

Item

Schema

id:

string, auto-generated

description:

string, multilingual, required

OpenContracting Description: A description of the goods, services to be provided.

Auction subject / asset description.

classification:

Classification, required

OpenContracting Description: The primary classification for the item. See the itemClassificationScheme to identify preferred classification lists, including CAV and GSIN.

It is required for classification.scheme to be CPV or CAV-PS. The classification.id should be valid CPV or CAV-PS code.

The CPV & CAV-PS codes accuracy should be equal to the class (XXXX0000-Y) at least.

additionalClassifications:
 

List of Classification objects, optional

OpenContracting Description: An array of additional classifications for the item. See the itemClassificationScheme codelist for common options to use in OCDS. This may also be used to present codes from an internal classification scheme.

E.g.`CPVS`, DK018, cadastralNumber & UA-EDR can be chosen from the list. The codes are to be noted manually for cadastralNumber & UA-EDR.

unit:

Unit

OpenContracting Description: Description of the unit which the good comes in e.g. hours, kilograms. Made up of a unit name, and the value of a single unit.

quantity:

integer, required

OpenContracting Description: The number of units required

deliveryAddress:
 

Address, required

Address, where the item should be delivered.

deliveryLocation:
 

dictionary, optional

Geographical coordinates of delivery location. Element consist of the following items:

latitude:string, required
longitude:string, required
elevation:string, optional, usually not used

deliveryLocation usually takes precedence over deliveryAddress if both are present.

relatedLot:

string

Id of related Lot.

registrationDetails:
 

List of Registration Details

address:

Address

Address, where the item is located

Classification

Schema

scheme:

string

OpenContracting Description: A classification should be drawn from an existing scheme or list of codes. This field is used to indicate the scheme/codelist from which the classification is drawn. For line item classifications, this value should represent a known Item Classification Scheme wherever possible.

id:

string

OpenContracting Description: The classification code drawn from the selected scheme.

description:

string

OpenContracting Description: A textual description or title for the code.

uri:

uri

OpenContracting Description: A URI to identify the code. In the event individual URIs are not available for items in the identifier scheme this value should be left blank.

Unit

Schema

code:

string, required

UN/CEFACT Recommendation 20 unit code.

name:

string

OpenContracting Description: Name of the unit

Registration Details

Schema

status:

string, required

Possible values are:

unknown:default value;
registering:item is still registering;
complete:item has already been registered.
registrationID:

string, optional

The document identifier to refer to in the paper documentation.

Available for mentioning in status: complete.

registrationDate:
 

Date, optional

OpenContracting Description: The date on which the document was first published.

Available for mentioning in status: complete.

Organization

Schema

name:

string, multilingual, optional

Name of the organization.

identifier:

Identifier, required

The primary identifier for this organization.

additionalIdentifiers:
 

List of Identifier objects, optional

address:

Address, required

contactPoint:

ContactPoint, required

additionalContactPoints:
 

Array of ContactPoint objects, required

Identifier

Schema

scheme:

string

OpenContracting Description: Organization identifiers be drawn from an existing identification scheme. This field is used to indicate the scheme or codelist in which the identifier will be found. This value should be drawn from the Organization Identifier Scheme.

id:

string, required

OpenContracting Description: The identifier of the organization in the selected scheme.

The allowed codes are the ones found in “Organisation Registration Agency” codelist of IATI Standard with addition of UA-EDR code for organizations registered in Ukraine (EDRPOU and IPN).

legalName:

string, multilingual

OpenContracting Description: The legally registered name of the organization.

Full legal name (e.g. Nadra Bank).

uri:

uri

OpenContracting Description: A URI to identify the organization, such as those provided by Open Corporates or some other relevant URI provider. This is not for listing the website of the organization: that can be done through the url field of the Organization contact point.

Address

Schema

streetAddress:

string, optional

OpenContracting Description: The street address. For example, 1600 Amphitheatre Pkwy.

locality:

string, optional

OpenContracting Description: The locality. For example, Mountain View.

region:

string, optional

OpenContracting Description: The region. For example, CA.

postalCode:

string, optional

OpenContracting Description: The postal code. For example, 94043.

countryName:

string, multilingual, required

OpenContracting Description: The country name. For example, United States.

ContactPoint

Schema

name:

string, multilingual, required

OpenContracting Description: The name of the contact person, department, or contact point, for correspondence relating to this contracting process.

email:

email

OpenContracting Description: The e-mail address of the contact point/person.

telephone:

string

OpenContracting Description: The telephone number of the contact point/person. This should include the international dialling code.

faxNumber:

string

OpenContracting Description: The fax number of the contact point/person. This should include the international dialling code.

url:

url

OpenContracting Description: A web address for the contact point/person.

Either email or telephone field has to be provided.

Period

Schema

startDate:

string, Date

OpenContracting Description: The start date for the period.

endDate:

string, Date, required

OpenContracting Description: The end date for the period.

startDate should always precede endDate.

Date

Date/time in Date Format: ISO 8601.

Value

Schema

amount:

float, required

OpenContracting Description: Amount as a number.

Should be positive.

currency:

string, required

OpenContracting Description: The currency in 3-letter ISO 4217 format.

valueAddedTaxIncluded:
 

bool, required

Change

Schema

id:

uid, auto-generated

The identifier for this Change.

rationale:

string, multilingual, required

Reason for contract change

rationaleTypes:

List of strings, required

Type of the rationale behind contract change

Changes to the contract can be made in cases described in the 4th part of Article 36 of the Law “On the Public Procurement”.

Possible string values are:

  • volumeCuts - Reduction of the procurement’s volume

    reduction of the procurement’s volume, particularly taking into account the actual expenditures of the procuring entity;

  • itemPriceVariation - Change in the unit’s price

    change in the unit’s price (no more than 10%) due to product’s price fluctuations on the market, provided that the said change will not increase the sum of money specified in the contract;

  • qualityImprovement - Improvement of the procurement item’s quality

    improvement of the item’s quality, provided that such improvement will not increase the sum of money specified in the contract;

  • durationExtension - Extension of the period of the contract duration (due to documented objective circumstances)

    extension of the period of the contract duration and obligations fulfilment regarding the transfer of goods, implementation of works and provision of services in case of documented objective circumstances that led to such extension, including force majeure, delays in funding of procuring entity’s expenditures, provided that such changes will not increase the sum of money specified in the contract;

  • priceReduction - Coordinated price reduction

    coordinated downward price change (without changing the quantity (volume) and quality of goods, works, and services);

  • taxRate - Price changes due to changes in tax rates and fees

    price changes due to changes in tax rates and fees in proportion to changes of those rates;

  • thirdParty - Change of the third-party indicators (rate, indices…)

    changes of established under the law by the State Statistics Service consumer price index, changes in foreign currency, changes in stock prices or Platts indices, regulated prices (rates) and standards that are used in the procurement contract if the price change order is specified in the procurement contract;

  • fiscalYearExtension - Extension of the period of the contract duration to the next year

    changes in contract terms according to the provisions of part 5 of Article 36.

    Article 36 Part 5. Effect of the procurement contract may be continued for a period sufficient for conduction of the procurement procedure at the beginning of the next year in volume that does not exceed 20% of the sum specified in the contract concluded in the previous year, if expenditures for this purpose are approved in the prescribed manner.

date:

string, Date, auto-generated

dateSigned:

string, Date

contractNumber:

string

status:

string, required

The current status of the change.

Possible values are:

  • pending - this change has been added.
  • active - this change has been confirmed.

Note

The function associated with changes is not used.

Contract Workflow

digraph G {
   subgraph cluster_0 {
    node [style=filled, fillcolor=seashell2];
    edge[style=dashed,  arrowhead="vee"];
    "active.confirmaition" -> "active.payment"
    edge[style=solid,  arrowhead="vee"];
    "active.payment" -> "active.approval"
    "active.approval" -> "active"
    "active" -> "pending.terminated"
    "pending.terminated" -> "terminated"
    color=white;
   }

    "active.payment" -> "pending.unsuccessful"
    "active.approval" -> "pending.unsuccessful"
    "active" -> "pending.unsuccessful"
    "pending.unsuccessful" -> "unsuccessful"
}

Legend

  • dashed line - user action
  • solid line - action is done automatically

Milestone Workflow

digraph G {
  subgraph cluster_1 {
    node [style=filled, fillcolor=seashell2]
    edge[style=solid,  arrowhead="vee"]
    "scheduled" -> "processing"
    "processing" -> "met"
    color=white
  }

  subgraph cluster_2 {
    "processing" -> "partiallyMet"
    color=white
  }

  subgraph cluster_3 {
    edge[style=dashed,  arrowhead="vee"]
    "processing" -> "notMet"
    color=white
  }
}

Legend

  • dashed line - user action
  • solid line - action is done automatically

Tutorial

Exploring basic rules

Let’s try exploring the /contracts endpoint:

GET /api/2.5/contracts HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "next_page": {
    "path": "/api/2.5/contracts?offset=",
    "uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/contracts?offset=",
    "offset": ""
  },
  "data": []
}

Just invoking it reveals an empty set.

Contract is transferred from the auction system by an automated process.

Creating contract

Let’s say that we have conducted procedure and it has complete status. When the procedure is completed, contract (that has been created in the auction system) is transferred to the contract system automatically.

Brokers (eMalls) can’t create contracts in the contract system.

The contract initially receives active.confirmaition status.

GET /api/2.5/contracts/08edeb5a34f3463aae55c1b9780be761 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active.confirmation",
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "6cb841dc37984ad7860d93d9bf8488e6",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-12T14:02:50.678865+03:00",
      "endDate": "2018-08-11T14:02:50.678870+03:00"
    },
    "dateSigned": "2018-07-12T14:02:50.678838+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "contracting",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "08edeb5a34f3463aae55c1b9780be761",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

Getting contract

Let’s access the URL of the created object. The internal identification of the contract (id) is noted within the Lots Registry (lot.contracts.relatedProcessID):

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active.confirmation",
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "contracting",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

Getting access

In order to get rights for future contract editing, you need to use access transfer mechanism.

Let’s create a transfer:

POST /api/2.5/transfers HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 12
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {}
}

Response: 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "access": {
    "transfer": "226e63d0f42a4791a9567d0452cb1e03",
    "token": "3b4905dbfbaf4ffaac2ff8f30dac2ae6"
  },
  "data": {
    "date": "2018-07-13T16:34:37.053910+03:00",
    "id": "4d4d01d4623e5f39a415d6603204794f"
  }
}

To acquire ownership on the contract, we must to use that transfer:

POST /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/ownership HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 100
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "transfer": "b04f2563ac9c4a88b6c221d635bba8e5",
    "id": "4d4d01d4623e5f39a415d6603204794f"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active.confirmation",
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "broker",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

For futher actions to be applied you need to activate the contract. Using access_token change status of the contract to active.payment:

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 38
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "status": "active.payment"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active.payment",
    "milestones": [
      {
        "status": "processing",
        "type": "financing",
        "id": "f4a8d4e93c68484d999dea2648f69fba",
        "dueDate": "2018-10-08T18:00:00+03:00"
      },
      {
        "status": "scheduled",
        "type": "approval",
        "id": "f4884f4dbd074d5dbb3a91567dbdd9c8"
      },
      {
        "status": "scheduled",
        "type": "reporting",
        "id": "754aae61b4184c95ad7ac9351e2a48a8"
      }
    ],
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "broker",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

Now let’s view contracts.

GET /api/2.5/contracts HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "next_page": {
    "path": "/api/2.5/contracts?offset=2018-07-13T16%3A34%3A37.122544%2B03%3A00",
    "uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/contracts?offset=2018-07-13T16%3A34%3A37.122544%2B03%3A00",
    "offset": "2018-07-13T16:34:37.122544+03:00"
  },
  "data": [
    {
      "id": "dda226649ee64264aded84f41f7f7a13",
      "dateModified": "2018-07-13T16:34:37.122544+03:00"
    }
  ]
}

Milestones

There are 3 milestones within:

  • financing milestone;
  • approval milestone;
  • reporting milestone.

Working with the financing milestone

The milestone initially receives processing status with an auto-generated dueDate equal to (dateSigned + 60 days):

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/f4a8d4e93c68484d999dea2648f69fba HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "processing",
    "type": "financing",
    "id": "f4a8d4e93c68484d999dea2648f69fba",
    "dueDate": "2018-10-08T18:00:00+03:00"
  }
}

It is then when the winner has to introduce the payment (the sum suggested within the auction). As soon as the payment is received, the Organizer has to mention this date within the dateMet field. If dateMet lies within the suggested frames (up to dueDate), the milestone status will be automatically switched to met:

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/f4a8d4e93c68484d999dea2648f69fba?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 50
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "dateMet": "2018-10-06T18:00:00+03:00"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "met",
    "dateModified": "2018-07-13T16:34:37.504172+03:00",
    "id": "f4a8d4e93c68484d999dea2648f69fba",
    "dateMet": "2018-10-06T18:00:00+03:00",
    "type": "financing",
    "dueDate": "2018-10-08T18:00:00+03:00"
  }
}

If dateMet is after dueDate, the milestone status will be switched to partiallyMet:

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/f4a8d4e93c68484d999dea2648f69fba?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 50
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "dateMet": "2018-10-10T18:00:00+03:00"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "partiallyMet",
    "dateModified": "2018-07-13T16:34:37.535284+03:00",
    "id": "f4a8d4e93c68484d999dea2648f69fba",
    "dateMet": "2018-10-10T18:00:00+03:00",
    "type": "financing",
    "dueDate": "2018-10-08T18:00:00+03:00"
  }
}

Both of the described actions result in contract being changed its status from active.payment to active.approval:

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active.approval",
    "milestones": [
      {
        "status": "partiallyMet",
        "dateModified": "2018-07-13T16:34:37.535284+03:00",
        "id": "f4a8d4e93c68484d999dea2648f69fba",
        "dateMet": "2018-10-10T18:00:00+03:00",
        "type": "financing",
        "dueDate": "2018-10-08T18:00:00+03:00"
      },
      {
        "status": "processing",
        "type": "approval",
        "id": "f4884f4dbd074d5dbb3a91567dbdd9c8",
        "dueDate": "2018-11-07T18:00:00+03:00"
      },
      {
        "status": "scheduled",
        "type": "reporting",
        "id": "754aae61b4184c95ad7ac9351e2a48a8"
      }
    ],
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "broker",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

The Organizer can also switch the milestone status to notMet if the payment has not been introduced at all. This one will change the contract status to pending.unsuccessful. As long as the lot becomes pending.dissolution, the contract receives unsuccessful status.

We don’t show a request for this, because it’s irreversable action, and after it we cannot fully demonstrate the work with contracts.

Working with the approval milestone

The milestone initially receives scheduled status. As long as the contract receives active.approval, status of the approval milestone is changed to processing. The dueDate here is equal to (financing milestone’s dateMet + 20 business days)

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/f4884f4dbd074d5dbb3a91567dbdd9c8 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "processing",
    "type": "approval",
    "id": "f4884f4dbd074d5dbb3a91567dbdd9c8",
    "dueDate": "2018-11-07T18:00:00+03:00"
  }
}

The Organizer can also optionally set the dueDate of the reporting milestone. It can be done only when the reporting milestone has status scheduled. If dueDate will not be set manually, it will be set automatically.

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/754aae61b4184c95ad7ac9351e2a48a8?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 50
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "dueDate": "2022-02-19T18:00:00+03:00"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "scheduled",
    "dateModified": "2018-07-13T16:34:37.592359+03:00",
    "type": "reporting",
    "dueDate": "2022-02-19T18:00:00+03:00",
    "id": "754aae61b4184c95ad7ac9351e2a48a8"
  }
}

It is then when the Organizer has to upload the Small-Scale Privatization Completion Report (documentType: approvalProtocol), note the date when the Report has been signed (dateMet field) and change status of the current milestone to met (if dateMet lies within the suggested frames) or partiallyMet (if not) by setting actual dateMet:

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/f4884f4dbd074d5dbb3a91567dbdd9c8?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 50
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "dateMet": "2018-11-05T18:00:00+03:00"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "met",
    "dateModified": "2018-07-13T16:34:37.620588+03:00",
    "id": "f4884f4dbd074d5dbb3a91567dbdd9c8",
    "dateMet": "2018-11-05T18:00:00+03:00",
    "type": "approval",
    "dueDate": "2018-11-07T18:00:00+03:00"
  }
}

The actions performed lead to the contract being changed its status from active.approval to active:

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "active",
    "milestones": [
      {
        "status": "partiallyMet",
        "dateModified": "2018-07-13T16:34:37.535284+03:00",
        "id": "f4a8d4e93c68484d999dea2648f69fba",
        "dateMet": "2018-10-10T18:00:00+03:00",
        "type": "financing",
        "dueDate": "2018-10-08T18:00:00+03:00"
      },
      {
        "status": "met",
        "dateModified": "2018-07-13T16:34:37.620588+03:00",
        "id": "f4884f4dbd074d5dbb3a91567dbdd9c8",
        "dateMet": "2018-11-05T18:00:00+03:00",
        "type": "approval",
        "dueDate": "2018-11-07T18:00:00+03:00"
      },
      {
        "status": "processing",
        "dateModified": "2018-07-13T16:34:37.592359+03:00",
        "type": "reporting",
        "dueDate": "2022-02-19T18:00:00+03:00",
        "id": "754aae61b4184c95ad7ac9351e2a48a8"
      }
    ],
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "broker",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

In case of the Completion Report has not been introduced, the Organizer has to manually switch milestone status to notMet. This one will change the contract status to pending.unsuccessful. As long as the lot becomes pending.dissolution, the contract receives unsuccessful status.

Working with the reporting milestone

The milestone initially receives scheduled status. As long as the contract receives active, status of the reporting milestone is changed to processing. The dueDate here is equal to either (reporting milestone’s dateMet + 3 years) or the date mentioned before.

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/754aae61b4184c95ad7ac9351e2a48a8 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "processing",
    "dateModified": "2018-07-13T16:34:37.592359+03:00",
    "type": "reporting",
    "dueDate": "2022-02-19T18:00:00+03:00",
    "id": "754aae61b4184c95ad7ac9351e2a48a8"
  }
}

As long as all of the contract conditions have been met, the Organizer has to mention the appropriate dateMet and change status of the current milestone to met (if dateMet lies within the suggested frames) or partiallyMet (if not):

PATCH /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/milestones/754aae61b4184c95ad7ac9351e2a48a8?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 50
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "dateMet": "2022-02-17T18:00:00+03:00"
  }
}

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "met",
    "dateModified": "2018-07-13T16:34:37.683352+03:00",
    "id": "754aae61b4184c95ad7ac9351e2a48a8",
    "dateMet": "2022-02-17T18:00:00+03:00",
    "type": "reporting",
    "dueDate": "2022-02-19T18:00:00+03:00"
  }
}

The actions performed lead to the contract being changed its status from active to pending.terminated:

GET /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "status": "pending.terminated",
    "milestones": [
      {
        "status": "partiallyMet",
        "dateModified": "2018-07-13T16:34:37.535284+03:00",
        "id": "f4a8d4e93c68484d999dea2648f69fba",
        "dateMet": "2018-10-10T18:00:00+03:00",
        "type": "financing",
        "dueDate": "2018-10-08T18:00:00+03:00"
      },
      {
        "status": "met",
        "dateModified": "2018-07-13T16:34:37.620588+03:00",
        "id": "f4884f4dbd074d5dbb3a91567dbdd9c8",
        "dateMet": "2018-11-05T18:00:00+03:00",
        "type": "approval",
        "dueDate": "2018-11-07T18:00:00+03:00"
      },
      {
        "status": "met",
        "dateModified": "2018-07-13T16:34:37.683352+03:00",
        "id": "754aae61b4184c95ad7ac9351e2a48a8",
        "dateMet": "2022-02-17T18:00:00+03:00",
        "type": "reporting",
        "dueDate": "2022-02-19T18:00:00+03:00"
      }
    ],
    "merchandisingObject": "a930574bf8cd999cb7f9c9ed4ca68061",
    "title": "Test Contract",
    "items": [
      {
        "registrationDetails": {
          "status": "unknown"
        },
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "additionalClassifications": [
          {
            "scheme": "CAV",
            "id": "39513200-3",
            "description": "папір і картон гофровані, паперова й картонна тара"
          }
        ],
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "167e02bf440e43bb972fb7f9309ad82c",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "period": {
      "startDate": "2018-07-13T16:34:36.559259+03:00",
      "endDate": "2018-08-12T16:34:36.559264+03:00"
    },
    "dateSigned": "2018-07-13T16:34:36.559240+03:00",
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      },
      "additionalContactPoints": [
        {
          "name": "Державне управління справами",
          "telephone": "0440000000"
        }
      ]
    },
    "owner": "broker",
    "contractType": "ceasefire",
    "awardID": "376d560b2b2d452a80543865f3cab43e",
    "id": "dda226649ee64264aded84f41f7f7a13",
    "contractID": "a930574bf8cd405cb7f9c9ed4ca68061"
  }
}

As long as the lot becomes pending.sold, the contract receives terminated status so that any future modification to the contract are not allowed.

In case of the conditions have not been met, the Organizer has to manually switch milestone status to notMet. This one will change the contract status to pending.unsuccessful. As long as the lot becomes pending.dissolution, the contract receives unsuccessful status.

Uploading milestone document

Document has to be added in two stages:

  • you should upload document
  • you should set document properties "documentOf": "milesone" and "relatedItem": "{milestone.id}" in order to bind the uploaded document to the milestone:
POST /api/2.5/contracts/dda226649ee64264aded84f41f7f7a13/documents?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 389
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/msword",
    "url": "http://localhost/get/50f99bbf153e425cb6b5083b858a0d0f?KeyID=172d32c8&Signature=qhgD%2FYqFEh6Al6YkHzHuZEtWyconzWwU2MlKcvVrNHoeajAuRh4gafOCu9Zc1TVtFsfIc7gSU%2BhU1o2eZvl9CA%3D%3D",
    "title": "укр.doc",
    "documentOf": "milestone",
    "relatedItem": "f4a8d4e93c68484d999dea2648f69fba"
  }
}

Response: 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "укр.doc",
    "url": "http://localhost/get/50f99bbf153e425cb6b5083b858a0d0f?KeyID=172d32c8&Signature=qhgD%2FYqFEh6Al6YkHzHuZEtWyconzWwU2MlKcvVrNHoeajAuRh4gafOCu9Zc1TVtFsfIc7gSU%2BhU1o2eZvl9CA%3D%3D",
    "format": "application/msword",
    "documentOf": "milestone",
    "datePublished": "2018-07-13T16:34:37.727546+03:00",
    "id": "270392a2094047c3a84023b4271a7e94",
    "relatedItem": "f4a8d4e93c68484d999dea2648f69fba",
    "dateModified": "2018-07-13T16:34:37.727563+03:00"
  }
}

Uploading documentation

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

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.5/contracts/dda226649ee64264aded84f41f7f7a13/documents/270392a2094047c3a84023b4271a7e94?acc_token=3b4905dbfbaf4ffaac2ff8f30dac2ae6 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net

Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
  "data": {
    "hash": "md5:00000000000000000000000000000000",
    "title": "укр.doc",
    "url": "http://localhost/get/50f99bbf153e425cb6b5083b858a0d0f?KeyID=172d32c8&Signature=qhgD%2FYqFEh6Al6YkHzHuZEtWyconzWwU2MlKcvVrNHoeajAuRh4gafOCu9Zc1TVtFsfIc7gSU%2BhU1o2eZvl9CA%3D%3D",
    "format": "application/msword",
    "documentOf": "milestone",
    "datePublished": "2018-07-13T16:34:37.727546+03:00",
    "id": "270392a2094047c3a84023b4271a7e94",
    "relatedItem": "f4a8d4e93c68484d999dea2648f69fba",
    "dateModified": "2018-07-13T16:34:37.727563+03:00"
  }
}

Indices and tables