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: cancellationDetails.
- 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: | string, auto-generated, read-only |
---|---|
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: | string, 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: | string, auto-generated, read-only OpenContracting Description: Date when the asset was last modified. |
rectificationPeriod: | |
Period, auto-generated Period during which the owner of an asset can edit it. |
|
status: | string, required The asset status within the Registry. Possible values are:
|
relatedLot: | string, required in active status ID of the related Lot. |
title: | string, multilingual, required
Oprionally 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 OpenContracting Description: All related documents and attachments. |
assetCustodian: | Organization, required The entity managing the asset. |
assetHolder: | Organization, optional The entity whom the asset was used to be owned by. |
decisions: | array of Decisions, required |
item: | array of Item, required |
mode: | 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 auction 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. |
Either email or telephone field has to be provided.
Documents¶
Schema¶
id: | string, auto-generated |
---|---|
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. |
title: | string, multilingual, required OpenContracting Description: The document title. |
description: | string, multilingual 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 OpenContracting Description: Direct link to the document or attachment. |
datePublished: | string, Date, auto-generated OpenContracting Description: The date on which the document was first published. |
dateModified: | string, Date, auto-generated 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: | string, 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 |
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 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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"next_page": {
"path": "/api/2.4/assets?offset=",
"uri": "http://lb.api-sandbox.registry.ea2.openprocurement.net/api/2.4/assets?offset=",
"offset": ""
},
"data": []
}
Just invoking it reveals empty set.
Now let’s attempt creating some asset:
POST /api/2.4/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.ea2.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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 4
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2734
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"address": {
"countryName": "Україна"
}
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea2.openprocurement.net/api/2.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7
X-Content-Type-Options: nosniff
{
"access": {
"token": "f9954df58b5c4f40a7ba11f1eae6063c"
},
"data": {
"status": "draft",
"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": "м. Київ"
}
}
}
}
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.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7?acc_token=f9954df58b5c4f40a7ba11f1eae6063c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 31
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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": "2018-05-22T13:39:54.509530+03:00",
"endDate": "2018-05-23T13:39:54.509530+03:00"
},
"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.510132+03:00",
"owner": "broker",
"date": "2018-05-22T13:39:54.509861+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": "м. Київ"
}
}
}
}
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.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2018-05-22T13:39:54.509530+03:00",
"endDate": "2018-05-23T13:39:54.509530+03:00"
},
"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.510132+03:00",
"owner": "broker",
"date": "2018-05-22T13:39:54.509861+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": "м. Київ"
}
}
}
}
We can see the same response we got after creating asset.
Let’s see what listing of assets reveals us:
GET /api/2.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
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"
}
]
}
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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2734
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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"
},
"id": "0",
"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"
},
"id": "0",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256",
"uri": "http://www.dus.gov.ua/"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна",
"postalCode": "01220",
"region": "м. Київ",
"streetAddress": "вул. Банкова, 11, корпус 1",
"locality": "м. Київ"
}
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea2.openprocurement.net/api/2.4/assets/8a94b664b34740dfbb4d3109f1e2ec61
X-Content-Type-Options: nosniff
{
"access": {
"token": "799ae2f90a16420ca7a32e9493fa2f20"
},
"data": {
"status": "draft",
"assetType": "bounce",
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.202137+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.202180+03:00",
"id": "bfe3c9b7e55846859049aa9f00ffc54e"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2018-05-22-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": "7646155d79c049538715fc82837b0931",
"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": "1c6b8c9b6ca2486aa765798fe199d806",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2018-05-22T13:40:23.205533+03:00",
"owner": "broker",
"date": "2018-05-22T13:40:23.201731+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "8a94b664b34740dfbb4d3109f1e2ec61",
"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": "м. Київ"
}
}
}
}
After switching this object to pending, let’s check what assets registry contains:
GET /api/2.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
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"
},
{
"id": "f9954df58b5c4f40a7ba11f1eae6063c",
"dateModified": "2018-05-22T13:39:54.510132+03:00"
}
]
}
And indeed we have 2 assets now.
Modifying Asset¶
Let’s update asset description:
PATCH /api/2.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7?acc_token=f9954df58b5c4f40a7ba11f1eae6063c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 347
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.openprocurement.net
DATA:
{
"data": {
"description": "Земельні ділянки із великими покладами благородних металів"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2018-05-22T13:39:54.509530+03:00",
"endDate": "2018-05-23T13:39:54.509530+03:00"
},
"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:40:23.343097+03:00",
"owner": "broker",
"date": "2018-05-22T13:39:54.509861+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": "м. Київ"
}
}
}
}
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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
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:40:23.343097+03:00"
}
]
}
Let’s modify one of the items added before:
PATCH /api/2.4/assets/c6f779c422954268b1bb2adf139e307d/items/50ffa36d59084905a520d8a1069565cd HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 748
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.openprocurement.net
X-Access-Token: 7339b31b04cc44d8ad3c756e4b3545b4
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": "50ffa36d59084905a520d8a1069565cd",
"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.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7/documents HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 350
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.openprocurement.net
X-Access-Token: f9954df58b5c4f40a7ba11f1eae6063c
DATA:
{
"data": {
"url": "http://localhost/get/d569aea176a947e5abaf289e583cf96b?KeyID=9f887607&Signature=b4DgGl2WRakYWuEwJAZGbjbvN3Bu3cslLQJmcwXZzO%2FstWuhw75ZouJ5R7qEOU46OvwnAA1TO0s%2FRFWHAHOBBw%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.ea2.openprocurement.net/api/2.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7/documents/c793551c2cdd483f89ac60d7ce36bc76
X-Content-Type-Options: nosniff
{
"data": {
"dateModified": "2018-05-22T13:40:23.403225+03:00",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword",
"url": "http://localhost/get/d569aea176a947e5abaf289e583cf96b?KeyID=9f887607&Signature=z3YrEXB8FwIR3ulRtu4lPjsEqD5kHKlH8rrCRG9kvJE6Ph%252Bjg%2FKou%252BxAsAhtlxFcKtYoAi8wMn0c1hf126IQDA%253D%253D",
"author": "asset_owner",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.403197+03:00",
"documentType": "cancellationDetails",
"title": "укр.doc",
"id": "c793551c2cdd483f89ac60d7ce36bc76"
}
}
And now asset can be easily deleted:
PATCH /api/2.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7?acc_token=f9954df58b5c4f40a7ba11f1eae6063c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 31
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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": "2018-05-22T13:39:54.509530+03:00",
"endDate": "2018-05-23T13:39:54.509530+03:00"
},
"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"
},
{
"dateModified": "2018-05-22T13:40:23.403225+03:00",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword",
"url": "http://localhost/get/d569aea176a947e5abaf289e583cf96b?KeyID=9f887607&Signature=z3YrEXB8FwIR3ulRtu4lPjsEqD5kHKlH8rrCRG9kvJE6Ph%252Bjg%2FKou%252BxAsAhtlxFcKtYoAi8wMn0c1hf126IQDA%253D%253D",
"author": "asset_owner",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.403197+03:00",
"documentType": "cancellationDetails",
"title": "укр.doc",
"id": "c793551c2cdd483f89ac60d7ce36bc76"
}
],
"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:40:23.486221+03:00",
"owner": "broker",
"date": "2018-05-22T13:40:23.486033+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": "м. Київ"
}
}
}
}
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.4/assets/e5ad643dfbbf4689a1adfec69f254603 HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Content-Length: 86
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.openprocurement.net
DATA:
{
"data": {
"status": "verification",
"relatedLot": "888fa9fe1a544efd962c013a23b3277f"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "verification",
"relatedLot": "888fa9fe1a544efd962c013a23b3277f",
"rectificationPeriod": {
"startDate": "2018-05-23T13:21:12.727792+03:00",
"endDate": "2018-05-24T13:21:12.727792+03:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-23T13:21:12.647141+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-23T13:21:12.647227+03:00",
"id": "9f159b4177524cedb71231de6843cd1d"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2018-05-23-000001",
"assetType": "bounce",
"dateModified": "2018-05-23T13:21:12.808217+03:00",
"owner": "broker",
"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": "5be78bff843544d8babc11965f3509d8",
"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": "3efae29fac6a4f0f9a742c143d9b9e91",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"date": "2018-05-23T13:21:12.807966+03:00",
"decisions": [
{
"decisionDate": "2018-05-23T13:21:10.853759+03:00",
"decisionID": "1111-4"
}
],
"id": "e5ad643dfbbf4689a1adfec69f254603",
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256"
},
"address": {
"countryName": "Україна"
}
}
}
}
In case of the asset being available, its status automatically becomes active.
GET /api/2.4/assets/7ca56d7436a1441da057379056a26840 HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "active",
"relatedLot": "4bc7b2bbce9c4d30a125677cd8a6af85",
"rectificationPeriod": {
"startDate": "2018-05-22T13:40:23.777353+03:00",
"endDate": "2018-05-23T13:40:23.777353+03:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.714151+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.714189+03:00",
"id": "e89331862c044d4ab8260d274ae7b862"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2018-05-22-000001",
"assetType": "bounce",
"dateModified": "2018-05-22T13:40:23.899883+03:00",
"owner": "broker",
"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": "dab50dde2a5843658f02d790fd3cf2e5",
"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": "02079cb4c55943cfb5c4629aa0ee450b",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"date": "2018-05-22T13:40:23.899692+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "7ca56d7436a1441da057379056a26840",
"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": "м. Київ"
}
}
}
}
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.4/assets/7ca56d7436a1441da057379056a26840 HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2018-05-22T13:40:23.777353+03:00",
"endDate": "2018-05-23T13:40:23.777353+03:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.714151+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.714189+03:00",
"id": "e89331862c044d4ab8260d274ae7b862"
}
],
"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": "dab50dde2a5843658f02d790fd3cf2e5",
"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": "02079cb4c55943cfb5c4629aa0ee450b",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2018-05-22T13:40:23.976785+03:00",
"owner": "broker",
"date": "2018-05-22T13:40:23.976551+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "7ca56d7436a1441da057379056a26840",
"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": "м. Київ"
}
}
}
}
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.4/assets/7ca56d7436a1441da057379056a26840 HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2018-05-22T13:40:23.777353+03:00",
"endDate": "2018-05-23T13:40:23.777353+03:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.714151+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.714189+03:00",
"id": "e89331862c044d4ab8260d274ae7b862"
}
],
"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": "dab50dde2a5843658f02d790fd3cf2e5",
"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": "02079cb4c55943cfb5c4629aa0ee450b",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2018-05-22T13:40:23.976785+03:00",
"owner": "broker",
"date": "2018-05-22T13:40:23.976551+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "7ca56d7436a1441da057379056a26840",
"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": "м. Київ"
}
}
}
}
As long as the lot receives pending.sold status, the asset attached to that lot becomes complete.
GET /api/2.4/assets/7ca56d7436a1441da057379056a26840 HTTP/1.0
Authorization: Basic Y29uY2llcmdlOg==
Host: lb.api-sandbox.registry.ea2.openprocurement.net
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "complete",
"relatedLot": "82900177353b4bf9963500218690f880",
"rectificationPeriod": {
"startDate": "2018-05-22T13:40:23.777353+03:00",
"endDate": "2018-05-23T13:40:23.777353+03:00"
},
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.714151+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.714189+03:00",
"id": "e89331862c044d4ab8260d274ae7b862"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2018-05-22-000001",
"assetType": "bounce",
"dateModified": "2018-05-22T13:40:24.192543+03:00",
"owner": "broker",
"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": "dab50dde2a5843658f02d790fd3cf2e5",
"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": "02079cb4c55943cfb5c4629aa0ee450b",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"date": "2018-05-22T13:40:24.192312+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "7ca56d7436a1441da057379056a26840",
"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": "м. Київ"
}
}
}
}
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.4/assets/5c8cd4c766c74f60b25b2b9cdbfb8ef7?acc_token=f9954df58b5c4f40a7ba11f1eae6063c HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 347
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.openprocurement.net
DATA:
{
"data": {
"description": "Земельні ділянки із великими покладами благородних металів"
}
}
Response: 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
{
"data": {
"status": "pending",
"assetType": "bounce",
"rectificationPeriod": {
"startDate": "2018-05-22T13:39:54.509530+03:00",
"endDate": "2018-05-23T13:39:54.509530+03:00"
},
"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:40:23.343097+03:00",
"owner": "broker",
"date": "2018-05-22T13:39:54.509861+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": "м. Київ"
}
}
}
}
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.4/assets?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2734
Content-Type: application/json
Host: lb.api-sandbox.registry.ea2.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"
},
"id": "0",
"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"
},
"id": "0",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"assetCustodian": {
"contactPoint": {
"name": "Державне управління справами",
"telephone": "0440000000"
},
"identifier": {
"scheme": "UA-EDR",
"id": "00037256",
"uri": "http://www.dus.gov.ua/"
},
"name": "Державне управління справами",
"address": {
"countryName": "Україна",
"postalCode": "01220",
"region": "м. Київ",
"streetAddress": "вул. Банкова, 11, корпус 1",
"locality": "м. Київ"
}
}
}
}
Response: 201 Created
Content-Type: application/json
Location: http://lb.api-sandbox.registry.ea2.openprocurement.net/api/2.4/assets/8a94b664b34740dfbb4d3109f1e2ec61
X-Content-Type-Options: nosniff
{
"access": {
"token": "799ae2f90a16420ca7a32e9493fa2f20"
},
"data": {
"status": "draft",
"assetType": "bounce",
"documents": [
{
"title": "Інформація про оприлюднення інформаційного повідомлення",
"url": "https://prozorro.sale/info/ssp_details ",
"documentOf": "asset",
"datePublished": "2018-05-22T13:40:23.202137+03:00",
"documentType": "informationDetails",
"dateModified": "2018-05-22T13:40:23.202180+03:00",
"id": "bfe3c9b7e55846859049aa9f00ffc54e"
}
],
"description": "Опис землі для космодрому",
"title": "Земля для космодрому",
"assetID": "UA-AR-DGF-2018-05-22-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": "7646155d79c049538715fc82837b0931",
"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": "1c6b8c9b6ca2486aa765798fe199d806",
"unit": {
"code": "code"
},
"quantity": 5.0001
}
],
"dateModified": "2018-05-22T13:40:23.205533+03:00",
"owner": "broker",
"date": "2018-05-22T13:40:23.201731+03:00",
"decisions": [
{
"decisionDate": "2018-05-22T13:39:53.504199+03:00",
"decisionID": "1111-4"
}
],
"id": "8a94b664b34740dfbb4d3109f1e2ec61",
"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": "м. Київ"
}
}
}
}
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.4/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.ea2.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"
}
]
}