Welcome to openregistry.assets.basic’s documentation!¶
Please report any problems or suggestions for improvement either via the mailing list or the issue tracker.
Contents:
Overview¶
openregistry.assets.bounce contains the description of the Registry Data Base.
Features¶
- Asset represents the initial information of an object to be privatized.
- The object to be created should be switched from draft to pending.
- Asset is being created with the automatically added documentType: informationDetails.
- Asset is a complicated entity the components of which are marked as items.
- For the asset to be deleted, the specific document (documentType: cancellationDetails) has to be attached.
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.
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.
Project status¶
The project has pre alpha status.
The source repository for this project is on GitHub: https://github.com/openprocurement/openregistry.assets.bounce
API stability¶
API is relatively stable. The changes in the API are communicated via Open Procurement API maillist.
Change log¶
0.1¶
Not Released
- Set up general build, testing, deployment, and ci framework.
- Creating/modifying asset
Next steps¶
You might find it helpful to look at the Tutorial, or the Command Reference.
Data Standard¶
Data standard is modelled along the Open Contracting Standard with extensions in areas that were not covered by it.
Asset¶
Schema¶
id: | uuid, auto-generated, read-only Internal identifier for this asset. |
---|---|
assetID: | string, auto-generated, read-only The asset identifier to refer to in the paper documentation. OpenContracting Description: AssetID is included to make the flattened data structure more convenient. |
date: | Date, auto-generated, read-only The date of asset creation/undoing. |
owner: | string, auto-generated, read-only The entity whom the asset has been created by. |
dateModified: | Date, auto-generated, read-only OpenContracting Description: Date when the asset was last modified. |
rectificationPeriod: | |
Period, auto-generated, read-only Period during which the owner of an asset can edit it. |
|
status: | string, required The asset status within the Registry. Possible values are: |
Status | Description |
---|---|
draft | Asset created but not yet available |
pending | Asset entered in the register |
verification | Asset availability check |
active | Passes an auction on the asset |
complete | Asset sold at auction |
deleted | The asset has been deleted |
relatedLot: | uuid ,auto-generated, read-only Internal id of the related Lot. |
---|---|
title: | string, multilingual, required
Optionally can be mentioned in English/Russian. |
description: | string, multilingual, required OpenContracting Description: A description of the goods, services to be provided.
|
documents: | Array of Documents, optional OpenContracting Description: All related documents and attachments. |
assetCustodian: | Organization, required The entity managing the asset. For a small privatization, the role is carried out by the Privatization Authority. |
assetHolder: | Organization, optional The entity whom the asset was used to be owned by. |
decisions: | Array of Decisions, required The decision to privatize the asset. Approval of the terms of sale of the lot. |
items: | Array of Item, required OpenContracting Description: The goods, services, and any intangible outcomes in this contract. |
mode: | string, optional The additional parameter with a value test. |
assetType: | string, required Type of the given asset. The only value is domain. |
sandboxParameters: | |
string, optional Parameter that accelerates asset periods. Set quick, accelerator=1440 as text value for sandboxParameters for the time frames to be reduced in 1440 times. |
Decisions¶
Schema¶
title: | string, multilingual, optional
|
---|---|
decisionOf: | string, auto-generated The given value is asset. |
decisionDate: | Date, required OpenContracting Description: The date on which the document was first published. |
decisionID: | string, required The decision identifier to refer to in the paper documentation. |
Period¶
Organization¶
Schema¶
name: | string, multilingual, required Name of the organization. |
---|---|
identifier: | Identifier, required The primary identifier for this organization. |
additionalIdentifiers: | |
Array of Identifier, optional |
|
address: | Address, required for assetCustodian |
contactPoint: | ContactPoint, required for assetCustodian |
additionalContactPoints: | |
Array of ContactPoint, optional |
|
kind: | string, optional Type of the organizer. Available only for assetCustodian.
|
Identifier¶
Schema¶
scheme: | string, required 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, optional OpenContracting Description: The legally registered name of the organization. Full legal name (e.g. Nadra Bank). |
uri: | uri, optional 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: | 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, optional OpenContracting Description: The fax number of the contact point/person. This should include the international dialling code. |
url: | URL, optional OpenContracting Description: A web address for the contact point/person. |
Note
Either email or telephone field has to be provided.
Documents¶
Schema¶
id: | uuid, auto-generated, read-only Internal identifier of the object within an array. |
---|---|
documentType: | string, required Type of the document. Possible values are:
The formal notice that gives details. This may be a link to a downloadable document, to a web page, or to an official gazette in which the notice is contained.
Detailed technical information about goods or services to be provided.
Presentation about the asset to be sold.
Auto-generated type of document that will be attached to each of the assets automatically.
Reasons why the asset has to be deleted.
Goods examination procedure rules / Asset familiarization procedure in data room. Contains information on where and when a given document can be examined offline.
Documentation that provides replies to issues raised in pre-bid conferences or an enquiry processes. |
title: | string, multilingual, required
Optionally can be mentioned in English/Russian. OpenContracting Description: The document title. |
description: | string, multilingual, required OpenContracting Description: A description of the goods, services to be provided.
OpenContracting Description: A short description of the document. In the event the document is not accessible online, the description field can be used to describe arrangements for obtaining a copy of the document. |
format: | string, optional OpenContracting Description: The format of the document taken from the IANA Media Types code list, with the addition of one extra value for ‘offline/print’, used when this document entry is being used to describe the offline publication of a document. |
url: | string, auto-generated, read-only OpenContracting Description: Direct link to the document or attachment. |
datePublished: | Date, auto-generated, read-only OpenContracting Description: The date on which the document was first published. |
dateModified: | Date, auto-generated, read-only OpenContracting Description: Date that the document was last modified |
language: | string, optional OpenContracting Description: Specifies the language of the linked document using either two-digit ISO 639-1, or extended BCP47 language tags. |
documentOf: | string, required Possible values are:
|
relatedItem: | uuid, optional |
index: | integer, optional OpenContracting Description: Sorting (display order) parameter used for illustrations. The smaller number is, the higher illustration is in the sorting. If index is not specified, illustration will be displayed the last. If two illustrations have the same index, they will be sorted depending on their publishing date. |
accessDetails: | string, optional Required for x_dgfAssetFamiliarization document. |
Item¶
Schema¶
id: | uuid, auto-generated, read-only Internal identifier for this item. |
||||||
---|---|---|---|---|---|---|---|
description: | string, multilingual, required OpenContracting Description: A description of the goods, services to be provided.
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 CAV-PS or CPV. The classification.id should be valid CAV-PS or CPV code. The CPV & CAV-PS codes accuracy should be equal to the class (XXXX0000-Y) at least. |
||||||
additionalClassifications: | |||||||
List of Classification, 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, required 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: | decimal, required OpenContracting Description: The number of units required |
||||||
address: | Address, required Address, where the item is located. |
||||||
location: | dictionary, optional Geographical coordinates of the location. Element consists of the following items:
location usually takes precedence over address if both are present. |
||||||
registrationDetails: | |||||||
Registration Details, required |
Registration Details¶
Schema¶
status: | string, required Possible values are:
|
||||||
---|---|---|---|---|---|---|---|
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. |
Classification¶
Schema¶
scheme: | string, required 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, required OpenContracting Description: The classification code drawn from the selected scheme. |
description: | string, required OpenContracting Description: A textual description or title for the code. |
uri: | uri, optional 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. |
Tutorial¶
Exploring basic rules¶
Let’s try exploring the /assets endpoint:
GET /api/2.5/assets?opt_pretty=1 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/assets?offset=",
"uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets?offset=",
"offset": ""
},
"data": []
}
Just invoking it reveals empty set.
Now let’s attempt creating some asset:
POST /api/2.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 415 Unsupported Media Type
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"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.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 422 Unprocessable Entity
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"status": "error",
"errors": [
{
"description": "Expecting value: line 1 column 1 (char 0)",
"location": "body",
"name": "data"
}
]
}
Error states that no data has been found in JSON body.
Creating asset¶
Let’s create asset with the minimal data set:
POST /api/2.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2508
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"assetType": "bounce",
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets/863366f04c97422191da348f0776797d
X-Content-Type-Options: nosniff
{
"access": {
"transfer": "c00c113cedb147649671c027d897cded",
"token": "1ea3dbc940594a65a75589286f7afad7"
},
"data": {
"status": "draft",
"assetType": "bounce",
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.020142+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.017150+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
The object you’re trying to add initially receives draft status. For the asset to be created within the Registry, it should be manually switched to pending status (2 Phase Commit mechanism):
PATCH /api/2.5/assets/863366f04c97422191da348f0776797d?acc_token=1ea3dbc940594a65a75589286f7afad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 31
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"status": "pending"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.081694+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.082059+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.081884+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
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 asset: its internal id (that matches the Location segment), its official assetID and dateModified datestamp stating the moment in time when asset was last modified. Pay attention to the assetType. Note that asset is created with pending status.
Let’s access the URL of the created object (the Location header of the response):
GET /api/2.5/assets/863366f04c97422191da348f0776797d 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",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.081694+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.082059+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.081884+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
We can see the same response we got after creating asset.
Let’s see what listing of assets reveals us:
GET /api/2.5/assets?opt_pretty=1 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/assets?offset=",
"uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets?offset=",
"offset": ""
},
"data": []
}
We do see the internal id of a asset (that can be used to construct full URL by prepending http://lb.api-sandbox.registry.ea2.openprocurement.net/api/<api_version>/assets/) and its dateModified datestamp.
Let’s create another asset:
POST /api/2.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2508
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"assetType": "bounce",
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets/6df9770ea7794f09b437638c3a356836
X-Content-Type-Options: nosniff
{
"access": {
"transfer": "66766dd2bcef4536907b9fbe55f04d05",
"token": "e2901be0e4a64a0c8b42879941b1732f"
},
"data": {
"status": "draft",
"assetType": "bounce",
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.193977+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.193998+02:00",
"id": "07e234f707324a648c9df1d7e8f0de79"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000002",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "2f2f333b15d3464ca245536dc6b014e8",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "0e49ed227b9a4997a5f3867c8ce3d82c",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.196216+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.193724+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "f87043f076414cbd906772349512605a",
"decisionOf": "asset"
}
],
"id": "6df9770ea7794f09b437638c3a356836",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
After switching this object to pending, let’s check what assets registry contains:
GET /api/2.5/assets?opt_pretty=1 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/assets?offset=2019-02-01T11%3A03%3A56.082059%2B02%3A00",
"uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets?offset=2019-02-01T11%3A03%3A56.082059%2B02%3A00",
"offset": "2019-02-01T11:03:56.082059+02:00"
},
"data": [
{
"id": "863366f04c97422191da348f0776797d",
"dateModified": "2019-02-01T11:03:56.082059+02:00"
}
]
}
And indeed we have 2 assets now.
Modifying Asset¶
Let’s update asset description:
PATCH /api/2.5/assets/863366f04c97422191da348f0776797d?acc_token=1ea3dbc940594a65a75589286f7afad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 347
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"description": "Земельні ділянки із великими покладами благородних металів"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.081694+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
}
],
"description": "Земельні ділянки із великими покладами благородних металів",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.328853+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.081884+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
We see the added properties have merged with existing asset data. Additionally, the dateModified property was updated to reflect the last modification date stamp.
Note that the asset can be modified only within the rectification period (up to rectificationPeriod.endDate).
Checking the listing again reflects the new modification date:
GET /api/2.5/assets?opt_pretty=1 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/assets?offset=2019-02-01T11%3A03%3A56.254834%2B02%3A00",
"uri": "http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets?offset=2019-02-01T11%3A03%3A56.254834%2B02%3A00",
"offset": "2019-02-01T11:03:56.254834+02:00"
},
"data": [
{
"id": "863366f04c97422191da348f0776797d",
"dateModified": "2019-02-01T11:03:56.082059+02:00"
},
{
"id": "6df9770ea7794f09b437638c3a356836",
"dateModified": "2019-02-01T11:03:56.254834+02:00"
}
]
}
Let’s modify one of the items added before:
PATCH /api/2.5/assets/863366f04c97422191da348f0776797d/items/3d09b283ac1742ac8814ba8bdab16c00 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 748
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
X-Access-Token: 1ea3dbc940594a65a75589286f7afad7
DATA:
{
"data": {
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 42
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 42
}
}
Deleting Asset¶
Let’s delete asset.
Firstly, a document with the documentType: canellationDetails has to be added:
POST /api/2.5/assets/863366f04c97422191da348f0776797d/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 352
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
X-Access-Token: 1ea3dbc940594a65a75589286f7afad7
DATA:
{
"data": {
"url": "http://localhost/get/aed1a56c6f494a05ab10f1c835003239?KeyID=172d32c8&Signature=dpWNbuMYhNRtb0B4Admyolz0emIv%2BWecLwesIc3rIemw2VFEPCK%2BWtZLHIKMt9%2BYeup6ymPBcxS6qid25i7EDA%3D%3D",
"title": "укр.doc",
"format": "application/msword",
"hash": "md5:00000000000000000000000000000000",
"documentType": "cancellationDetails"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets/863366f04c97422191da348f0776797d/documents/722caa1c29c143f5a5ee7f86bdddd4c3
X-Content-Type-Options: nosniff
{
"data": {
"hash": "md5:00000000000000000000000000000000",
"author": "asset_owner",
"title": "укр.doc",
"url": "http://localhost/get/aed1a56c6f494a05ab10f1c835003239?KeyID=172d32c8&Signature=cxwEo6tFApKOztFnfm4DQAIpi7OSQjYj32kBhMniEfKll%2FU4fODxYP4cuUJ1%252Bbn8gttFLYoITGEnE71ulmBPDg%253D%253D",
"format": "application/msword",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.417139+02:00",
"documentType": "cancellationDetails",
"dateModified": "2019-02-01T11:03:56.417160+02:00",
"id": "722caa1c29c143f5a5ee7f86bdddd4c3"
}
}
And now asset can be easily deleted:
PATCH /api/2.5/assets/863366f04c97422191da348f0776797d?acc_token=1ea3dbc940594a65a75589286f7afad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 31
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"status": "deleted"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "deleted",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.081694+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
},
{
"hash": "md5:00000000000000000000000000000000",
"author": "asset_owner",
"title": "укр.doc",
"url": "http://localhost/get/aed1a56c6f494a05ab10f1c835003239?KeyID=172d32c8&Signature=cxwEo6tFApKOztFnfm4DQAIpi7OSQjYj32kBhMniEfKll%2FU4fODxYP4cuUJ1%252Bbn8gttFLYoITGEnE71ulmBPDg%253D%253D",
"format": "application/msword",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.417139+02:00",
"documentType": "cancellationDetails",
"dateModified": "2019-02-01T11:03:56.417160+02:00",
"id": "722caa1c29c143f5a5ee7f86bdddd4c3"
}
],
"description": "Земельні ділянки із великими покладами благородних металів",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 42
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.494554+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.494383+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Integration with lots¶
As long as the lot is formed, the system should verify whether the asset can be attached to that lot. With the lot status being changed to verification the asset automatically reaches verification as well.
PATCH /api/2.5/assets/f5cb190c7a5646ef8be8dd2c59065b6f HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Content-Length: 36
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"status": "verification"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "verification",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.638121+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.578102+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.578123+02:00",
"id": "02ed657c81f848c2b84847e5df695a0a"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "51d63fd3c0b743ba921bb56d4576f7e5",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4612104c3d24162af96028e36602193",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "153216bcf4d545aba417a0d8d6a81892",
"decisionOf": "asset"
}
],
"dateModified": "2019-02-01T11:03:56.733707+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.733527+02:00",
"relatedProcesses": [
{
"type": "lot",
"id": "54657dec140f462ca28bf5b9c7b27518",
"relatedProcessID": "4d63fb44e1ed4fa895803644168e4268"
}
],
"id": "f5cb190c7a5646ef8be8dd2c59065b6f",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
In case of the asset being available, its status automatically becomes active.
GET /api/2.5/assets/f5cb190c7a5646ef8be8dd2c59065b6f HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "active",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.638121+02:00",
"endDate": "2019-02-01T11:03:56.789301+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.578102+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.578123+02:00",
"id": "02ed657c81f848c2b84847e5df695a0a"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "51d63fd3c0b743ba921bb56d4576f7e5",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4612104c3d24162af96028e36602193",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "153216bcf4d545aba417a0d8d6a81892",
"decisionOf": "asset"
}
],
"dateModified": "2019-02-01T11:03:56.797147+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.796967+02:00",
"relatedProcesses": [
{
"type": "lot",
"id": "54657dec140f462ca28bf5b9c7b27518",
"relatedProcessID": "4d63fb44e1ed4fa895803644168e4268"
}
],
"id": "f5cb190c7a5646ef8be8dd2c59065b6f",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
If the lot is formed incorrectly, the asset will automatically receive pending status and so that the relatedLot field will be empty.
GET /api/2.5/assets/f5cb190c7a5646ef8be8dd2c59065b6f HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.638121+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.578102+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.578123+02:00",
"id": "02ed657c81f848c2b84847e5df695a0a"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "51d63fd3c0b743ba921bb56d4576f7e5",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4612104c3d24162af96028e36602193",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "153216bcf4d545aba417a0d8d6a81892",
"decisionOf": "asset"
}
],
"dateModified": "2019-02-01T11:03:56.881441+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.881211+02:00",
"relatedProcesses": [
{
"type": "lot",
"id": "54657dec140f462ca28bf5b9c7b27518",
"relatedProcessID": "4d63fb44e1ed4fa895803644168e4268"
}
],
"id": "f5cb190c7a5646ef8be8dd2c59065b6f",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
As long as the lot status becomes either pending.deleted or pending.dissolution, the asset attached to that lot also receives pending status.
GET /api/2.5/assets/f5cb190c7a5646ef8be8dd2c59065b6f HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.638121+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.578102+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.578123+02:00",
"id": "02ed657c81f848c2b84847e5df695a0a"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "51d63fd3c0b743ba921bb56d4576f7e5",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4612104c3d24162af96028e36602193",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "153216bcf4d545aba417a0d8d6a81892",
"decisionOf": "asset"
}
],
"dateModified": "2019-02-01T11:03:56.881441+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.881211+02:00",
"relatedProcesses": [
{
"type": "lot",
"id": "54657dec140f462ca28bf5b9c7b27518",
"relatedProcessID": "4d63fb44e1ed4fa895803644168e4268"
}
],
"id": "f5cb190c7a5646ef8be8dd2c59065b6f",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
As long as the lot receives pending.sold status, the asset attached to that lot becomes complete.
GET /api/2.5/assets/f5cb190c7a5646ef8be8dd2c59065b6f HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "complete",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.638121+02:00",
"endDate": "2019-02-01T11:03:57.042006+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.578102+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.578123+02:00",
"id": "02ed657c81f848c2b84847e5df695a0a"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "51d63fd3c0b743ba921bb56d4576f7e5",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4612104c3d24162af96028e36602193",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "153216bcf4d545aba417a0d8d6a81892",
"decisionOf": "asset"
}
],
"dateModified": "2019-02-01T11:03:57.127063+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:57.126886+02:00",
"relatedProcesses": [
{
"type": "lot",
"id": "54657dec140f462ca28bf5b9c7b27518",
"relatedProcessID": "4d63fb44e1ed4fa895803644168e4268"
}
],
"id": "f5cb190c7a5646ef8be8dd2c59065b6f",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Retrieving Asset Information¶
Getting list of all assets¶
Getting list of all assets.
Example request:
GET /api/0/assets HTTP/1.0 Host: lb.api-sandbox.registry.ea2.openprocurement.net
Example response:
Response: 200 OK Content-Type: application/json X-Content-Type-Options: nosniff { "next_page": { "path": "/api/2.4/assets?offset=2018-05-22T13%3A39%3A54.510132%2B03%3A00", "uri": "http://lb.api-sandbox.registry.ea2.openprocurement.net/api/2.4/ assets?offset=2018-05-22T13%3A39%3A54.510132%2B03%3A00", "offset": "2018-05-22T13:39:54.510132+03:00" }, "data": [ { "id": "5c8cd4c766c74f60b25b2b9cdbfb8ef7", "dateModified": "2018-05-22T13:39:54.510132+03:00" } ] }
query offset: offset number query limit: limit number. default is 100 reqheader Authorization: optional OAuth token to authenticate statuscode 200: no error statuscode 404: endpoint not found
Sorting¶
Assets returned are sorted by modification time.
Limiting number of Assets returned¶
You can control the number of data entries in the assets feed (batch size) with limit parameter. If not specified, data is being returned in batches of 100 elements.
Batching¶
The response contains next_page element with the following properties:
offset: | This is the parameter you have to add to the original request you made to get next page. |
---|---|
path: | This is path section of URL with original parameters and offset parameter added/replaced above. |
uri: | The full version of URL for next page. |
If next page request returns no data (i.e. empty array) then there is little sense in fetching further pages.
Synchronizing¶
It is often necessary to be able to syncronize central database changes with other database (we’ll call it “local”). The default sorting “by modification date” together with Batching mechanism allows one to implement synchronization effectively. The synchronization process can go page by page until there is no new data returned. Then the synchronizer has to pause for a while to let central database register some changes and attempt fetching subsequent page. The next_page guarantees that all changes from the last request are included in the new batch.
The safe frequency of synchronization requests is once per 5 minutes.
Reading the individual asset information¶
-
GET
/assets/{uuid4:id}
¶ Getting asset details.
Example request:
GET /api/2.4/assets/2f684c8a57f447768a5a451e2e8e5892 HTTP/1.0 Host: lb.api-sandbox.registry.ea2.openprocurement.net
Example response:
Response: 200 OK Content-Type: application/json
- {
- “data”: {
“status”: “pending”, “assetType”: “bounce”, “documents”: [
- {
- “title”: “Інформація про оприлюднення інформаційного повідомлення”, “url”: “https://prozorro.sale/info/ssp_details ”, “documentOf”: “asset”, “datePublished”: “2018-05-22T13:39:54.423035+03:00”, “documentType”: “informationDetails”, “dateModified”: “2018-05-22T13:39:54.423082+03:00”, “id”: “e5796e629edd4477a730aa732a425f9d”
}
], “description”: “Опис землі для космодрому”, “title”: “Земля для космодрому”, “assetID”: “UA-AR-DGF-2018-05-22-000001”, “items”: [
- {
- “registrationDetails”: {
- “status”: “unknown”
}, “description”: “футляри до державних нагород”, “classification”: {
“scheme”: “CAV-PS”, “description”: “Description”, “id”: “06121000-6”}, “additionalClassifications”: [
- {
- “scheme”: “UA-EDR”, “description”: “папір і картон гофровані, паперова й картонна тара”, “id”: “17.21.1”
}
], “address”: {
“countryName”: “Ukraine”}, “id”: “ca254ba6052947539d7bb26aaa163e8d”, “unit”: {
“code”: “code”}, “quantity”: 5.0001
}, {
- “registrationDetails”: {
- “status”: “unknown”
}, “description”: “футляри до державних нагород”, “classification”: {
“scheme”: “CAV-PS”, “description”: “Description”, “id”: “06121000-6”}, “additionalClassifications”: [
- {
- “scheme”: “UA-EDR”, “description”: “папір і картон гофровані, паперова й картонна тара”, “id”: “17.21.1”
}
], “address”: {
“countryName”: “Ukraine”}, “id”: “1a1cf1d83a424e7284976caef828d680”, “unit”: {
“code”: “code”}, “quantity”: 5.0001
}
], “dateModified”: “2018-05-22T13:39:54.429965+03:00”, “owner”: “broker”, “date”: “2018-05-22T13:39:54.422540+03:00”, “decisions”: [
- {
- “decisionDate”: “2018-05-22T13:39:53.504199+03:00”, “decisionID”: “1111-4”
}
], “id”: “5c8cd4c766c74f60b25b2b9cdbfb8ef7”, “assetCustodian”: {
- “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”: “м. Київ”}
}
}
}
Request Headers: - Authorization – optional OAuth token to authenticate
Status Codes: - 200 OK – no error
- 404 Not Found – asset not found
Authentication¶
Some of the API requests (especially the ones that are read-only GET requests) do not require any authenication. The other ones, that modify data into the database, require broker authentication via API key. Additionally, owner tokens are issued to facilitate multiple actor roles upon object creation.
API keys¶
API key is username to use with Basic Authenication scheme.
Owner tokens¶
Getting token¶
The token is issued when object is created in the database:
You can see the access with token in response. Its value can be used to modify objects further under “Owner role”.
Using token¶
You can pass access token in the following ways:
- acc_token URL query string parameter
- X-Access-Token HTTP request header
- access.token in the body of POST/PUT/PATCH request
See the example of the action with token passed as URL query string:
PATCH /api/2.5/assets/863366f04c97422191da348f0776797d?acc_token=1ea3dbc940594a65a75589286f7afad7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 347
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"description": "Земельні ділянки із великими покладами благородних металів"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2019-02-01T11:03:56.081694+02:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.017442+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.017466+02:00",
"id": "bd5b68af29824668bded2ad5e9d1a469"
}
],
"description": "Земельні ділянки із великими покладами благородних металів",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000001",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "3d09b283ac1742ac8814ba8bdab16c00",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "d4b3fe3628df4a21ab49b24d5ffd4dca",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.328853+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.081884+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "a2799e7b35574c1d8854092b95e77fe6",
"decisionOf": "asset"
}
],
"id": "863366f04c97422191da348f0776797d",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
API in cluster mode¶
There is a cluster of several servers that synchronize data between each other. Client should always work with the same server to ensure consistency between separate requests to the CDB. That is why cookie is required while sending POST/PUT/PATCH/DELETE requests. Cookies provide server stickiness. You can get such cookie via GET request and then use it for POST/PUT/PATCH/DELETE.
If during operations the server requested by cookie went down or is unavailable, client will receive status code 412 of request and new cookie to use. Request should be repeated with new cookie.
Options¶
In addition to providing fields and their values in a request, you may also specify options to control how your request is interpreted and how the response is generated. For GET requests, options are specified as URL parameters prefixed with opt_. For POST or PUT requests, options are specified in the body, inside the top-level options object (a sibling of the data object). The option specified in the body overrides the opt_ one from URL parameter.
These options can be used in different combinations in a single request, though some of them may conflict in their impact on the response.
pretty: | ?opt_pretty options: { pretty: true } Provides the response in “pretty” output. In case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable to use this only during debugging. |
---|---|
jsonp: | ?opt_jsonp=myCallback Returns the output in JSON-P format instead of plain JSON. This allows requests to come from within browsers and work around the “same origin policy.” The function named as the value of the opt_jsonp parameter will be called with a single argument, a JavaScript object representing the response. |
fields: | ?opt_fields=comma,separated,field,list List of extra fields to include in response. |
Performance recommendations¶
Rate Control¶
“Aggressive” IP addresses can be restricted in the speed with which servers are processing CDB requests. In this case CDB will respond with status code 429 to the requests that returned faster than allowed.
Expected client response to such restriction is to repeat requests returned with 429 status code increasing the delay between individual requests sent to the CDB until requests become successful (2xx / 3xx responses).
Such CDB servers behavior is required in order to distribute server resources evenly between clients.
Responses¶
After processing API always provides response, reporting either success or failure.
Status Codes¶
In all cases, the API should return an HTTP Status Code that indicates the nature of the failure (see below), with a response body in JSON format containing additional information.
- 200
- Success. If data was requested, it will be available in the data field at the top level of the response body.
- 201
- Success (for object creation). Its information is available in the data field at the top level of the response body. The API URL where the object can be retrieved is also returned in the Location header of the response.
- 400
- Invalid request. This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
- 401
- No authorization. A valid API key was not provided with the request, so the API could not associate a user with the request.
- 403
- Forbidden. The API key and request syntax was valid but the server is refusing to complete the request. This can happen if you are trying to read or write to objects or properties that you do not have access to.
- 404
- Not found. Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
- 412
- Precondition Failed. See API in cluster mode.
- 429
- Rate Limit Enforced. See Rate control.
- 500
- Server error. There was a problem on OpenProcurement’s end.
Success Response¶
Every successful get, create, update, replace request results in response that contains data attribute. That data attribute contains full JSON object representation after the operation. If some data were generated in the result of processing (like new object IDs, or modified date) they are present in the respose.
The listing requests result in similar responses, but instead of single object in data attribute, the JSON response contains collection of objects.
Example Success Response¶
Here is a response that describes asset
POST /api/2.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2508
Content-Type: application/json
Host: lb.api-sandbox.registry.ea.openprocurement.net
DATA:
{
"data": {
"assetType": "bounce",
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"id": "06121000-6",
"description": "Description"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"address": {
"countryName": "Ukraine"
},
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea.openprocurement.net/api/2.5/assets/6df9770ea7794f09b437638c3a356836
X-Content-Type-Options: nosniff
{
"access": {
"transfer": "66766dd2bcef4536907b9fbe55f04d05",
"token": "e2901be0e4a64a0c8b42879941b1732f"
},
"data": {
"status": "draft",
"assetType": "bounce",
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details",
"documentOf": "asset",
"datePublished": "2019-02-01T11:03:56.193977+02:00",
"documentType": "informationDetails",
"dateModified": "2019-02-01T11:03:56.193998+02:00",
"id": "07e234f707324a648c9df1d7e8f0de79"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2019-02-01-000002",
"items": [
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "2f2f333b15d3464ca245536dc6b014e8",
"unit": {
"code": "code"
},
"quantity": 5.0001
},
{
"registrationDetails": {
"status": "unknown"
},
"description": "футляри до державних нагород",
"classification": {
"scheme": "CAV-PS",
"description": "Description",
"id": "06121000-6"
},
"additionalClassifications": [
{
"scheme": "UA-EDR",
"description": "папір і картон гофровані, паперова й картонна тара",
"id": "17.21.1"
}
],
"address": {
"countryName": "Ukraine"
},
"id": "0e49ed227b9a4997a5f3867c8ce3d82c",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2019-02-01T11:03:56.196216+02:00",
"owner": "broker",
"date": "2019-02-01T11:03:56.193724+02:00",
"decisions": [
{
"decisionDate": "2019-02-01T11:03:55.184232+02:00",
"decisionID": "1111-4",
"id": "f87043f076414cbd906772349512605a",
"decisionOf": "asset"
}
],
"id": "6df9770ea7794f09b437638c3a356836",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна"
},
"additionalContactPoints": [
{
"name": "name",
"email": "some@mail.com"
}
]
}
}
}
Error Response¶
In the event of an error, the response body will contain an errors field at the top level. It contains an array of at least one error object, described below:
location: | Part of the request causing the error. Possible values are header and body. |
---|---|
name: |
|
description: | Verbose (human readable) description of the error. |
Example Error Response¶
Sample below indicates incomplete request.
POST /api/2.5/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
Host: lb.api-sandbox.registry.ea.openprocurement.net
Response: 415 Unsupported Media Type
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"status": "error",
"errors": [
{
"description": "Content-Type header should be one of ['application/json']",
"location": "header",
"name": "Content-Type"
}
]
}
Acceleration mode for sandbox¶
If you want to experiment with assets, you can use acceleration mode and start your assets name “TESTING”.
Acceleration mode was developed to enable testing in the sandbox and to reduce time frames of the periods.
- To enable acceleration mode you will need to:
- add additional parameter mode with a value
test
; - set
quick, accelerator=1440
as text value for sandboxParameters. This parameter will accelerate auction periods. The number 1440 shows that restrictions and time frames will be reduced in 1440 times.
- add additional parameter mode with a value
This mode will work only in the sandbox.
Synchronization¶
- During normal auction synchronization via
/auctions
test auctions are not visible. - To get test auctions synchronize via
/auctions?mode=test
. - If you synchronize via
/auctions?mode=all
, then you will get all auctions. - Auction mode can be set only on lot creation (lots.auctions) phase, it can not be set later.
Note
Can not be used for assets.