Tutorial¶
Here is the list of requests:
GET /api/2.5/requests HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [],
"next_page": {
"offset": "",
"path": "/api/2.5/requests?offset=",
"uri": "http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests?offset="
}
}
There are no requests, so let’s post one:
Примітка
Next action allowed to users that belongs to next auth group:
public
POST /api/2.5/requests HTTP/1.0
Authorization: Basic cHVibGljOnB1YmxpYw==
Content-Length: 914
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"tenderId": "ffffffffffffffffffffffffffffffff",
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"parties": [
{
"name": "party name",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
}
}
],
"documents": [
{
"title": "doc.txt",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "plain/text"
}
]
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1
{
"data": {
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"dateModified": "2018-01-01T02:00:00+02:00",
"dateCreated": "2018-01-01T02:00:00+02:00",
"requestId": "UA-R-2018-01-01-000001",
"tenderId": "ffffffffffffffffffffffffffffffff",
"documents": [
{
"id": "5be38e76a17d479e913a0a8b47432e23",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:00:00+02:00",
"dateModified": "2018-01-01T02:00:00+02:00",
"author": "request_owner"
}
],
"parties": [
{
"id": "133e7ada35564da3bd5da0c54d57f212",
"name": "party name",
"datePublished": "2018-01-01T02:00:00+02:00",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
},
"roles": [
"public"
]
}
],
"id": "6270491497034cc79fe4a00e1b7b84f1"
}
}
Documents can be added to the object with separate request:
Примітка
Next action allowed to users that belongs to next auth group:
public
POST /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents HTTP/1.0
Authorization: Basic cHVibGljOnB1YmxpYw==
Content-Length: 315
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "doc(1).txt",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6e4e052020524377a5d5c66c08000ba1?Signature=XMsBXAprJGrPSBE0sUMfBpd7d8puyzhw1PJnlM%2FNZSwCJYLnJCa7CI7unQfT2h1HZdYDJmzVVXziPVIwLLURCw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "plain/text"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents/f92b51b672f743cc9f913760320624f9
{
"data": {
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(1).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6e4e052020524377a5d5c66c08000ba1?Signature=YFNaTNWcITSPPBImzR%252BfDMHgtJSaLVWbxJKrS8VFTR%252BSqd4L63e1rEySYJr5k%252BfNYqiLWi4NAZW%2FO1JT1LHsDg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "request_owner"
}
}
Documents can be changed:
Примітка
Next action allowed to users that belongs to next auth group:
public
PUT /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents/f92b51b672f743cc9f913760320624f9 HTTP/1.0
Authorization: Basic cHVibGljOnB1YmxpYw==
Content-Length: 326
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "doc(2).json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=AhAdnVKR22WUb2VNfZ6AngI28xPruzRm9dy3YCYl7ruo8Pz%2FxDsjvcpH4rLey%2BI2JiZf%2FyD73KmzQ5Uuy4wLBQ%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/json"
}
}
Response: 200 OK
Content-Type: application/json
{
"data": {
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(2).json",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=aDGWSUzxCNw8%252BsEj4h77bkcZS5K8C9jN%252BHnei3NRNrtWzu0nUFqxO%2FO%2FGws8v%2F%252BS9rTXWhsww%252Bs9eqx0gcTmBg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:02:00+02:00",
"author": "request_owner"
}
}
And the object itself can be changed by patching answer field only:
Примітка
Next action allowed to users that belongs to next auth group:
sas
PATCH /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1 HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 42
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"answer": "There is my answer"
}
}
Response: 200 OK
Content-Type: application/json
{
"data": {
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"answer": "There is my answer",
"dateAnswered": "2018-01-01T02:03:00+02:00",
"dateModified": "2018-01-01T02:03:00+02:00",
"dateCreated": "2018-01-01T02:00:00+02:00",
"requestId": "UA-R-2018-01-01-000001",
"tenderId": "ffffffffffffffffffffffffffffffff",
"documents": [
{
"id": "5be38e76a17d479e913a0a8b47432e23",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:00:00+02:00",
"dateModified": "2018-01-01T02:00:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(1).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6e4e052020524377a5d5c66c08000ba1?Signature=YFNaTNWcITSPPBImzR%252BfDMHgtJSaLVWbxJKrS8VFTR%252BSqd4L63e1rEySYJr5k%252BfNYqiLWi4NAZW%2FO1JT1LHsDg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(2).json",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=aDGWSUzxCNw8%252BsEj4h77bkcZS5K8C9jN%252BHnei3NRNrtWzu0nUFqxO%2FO%2FGws8v%2F%252BS9rTXWhsww%252Bs9eqx0gcTmBg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:02:00+02:00",
"author": "request_owner"
}
],
"parties": [
{
"id": "133e7ada35564da3bd5da0c54d57f212",
"name": "party name",
"datePublished": "2018-01-01T02:00:00+02:00",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
},
"roles": [
"public"
]
}
],
"id": "6270491497034cc79fe4a00e1b7b84f1"
}
}
Documents related to answer also can be added to the object with separate request:
Примітка
Next action allowed to users that belongs to next auth group:
sas
POST /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 315
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "doc(3).txt",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/29ec040bd85647289a6f7627985f4970?Signature=jBfRFdjWn4nG0gnM7obV1yfjiueCaZnVpEvgRH9qT3rDKrPUrp8RjpMLQHREpEYRu09s8f0%2BzO3584wQLixaBw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "plain/text"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents/05987ceeec0d434c99568077dc15c9a6
{
"data": {
"id": "05987ceeec0d434c99568077dc15c9a6",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(3).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/29ec040bd85647289a6f7627985f4970?Signature=oskLJCq7LX%2F8vlfsSoOiMpRSIbTAoXU4CB%2FpjLh%2FjqEbYXOBRDATxl6vu%2FHJ5VJXYiE6WspuJGWt8JMbQjzkBw%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "monitoring_owner"
}
}
Lets get all request documents:
GET /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1/documents HTTP/1.0
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [
{
"id": "5be38e76a17d479e913a0a8b47432e23",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:00:00+02:00",
"dateModified": "2018-01-01T02:00:00+02:00",
"author": "request_owner"
},
{
"id": "05987ceeec0d434c99568077dc15c9a6",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(3).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/29ec040bd85647289a6f7627985f4970?Signature=oskLJCq7LX%2F8vlfsSoOiMpRSIbTAoXU4CB%2FpjLh%2FjqEbYXOBRDATxl6vu%2FHJ5VJXYiE6WspuJGWt8JMbQjzkBw%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "monitoring_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(2).json",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=aDGWSUzxCNw8%252BsEj4h77bkcZS5K8C9jN%252BHnei3NRNrtWzu0nUFqxO%2FO%2FGws8v%2F%252BS9rTXWhsww%252Bs9eqx0gcTmBg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:02:00+02:00",
"author": "request_owner"
}
]
}
Once answer has been provided it can no longer be changed, lets make an attempt:
Примітка
Next action allowed to users that belongs to next auth group:
sas
PATCH /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1 HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 50
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"answer": "There is my another answer"
}
}
Response: 403 Forbidden
Content-Type: application/json
{
"status": "error",
"errors": [
{
"location": "url",
"name": "permission",
"description": "Forbidden"
}
]
}
Lets take a look at request. Notice that part of parties fields is not visible in public api:
GET /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1 HTTP/1.0
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": {
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"answer": "There is my answer",
"dateAnswered": "2018-01-01T02:03:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"dateCreated": "2018-01-01T02:00:00+02:00",
"requestId": "UA-R-2018-01-01-000001",
"tenderId": "ffffffffffffffffffffffffffffffff",
"documents": [
{
"id": "5be38e76a17d479e913a0a8b47432e23",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:00:00+02:00",
"dateModified": "2018-01-01T02:00:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(1).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6e4e052020524377a5d5c66c08000ba1?Signature=YFNaTNWcITSPPBImzR%252BfDMHgtJSaLVWbxJKrS8VFTR%252BSqd4L63e1rEySYJr5k%252BfNYqiLWi4NAZW%2FO1JT1LHsDg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(2).json",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=aDGWSUzxCNw8%252BsEj4h77bkcZS5K8C9jN%252BHnei3NRNrtWzu0nUFqxO%2FO%2FGws8v%2F%252BS9rTXWhsww%252Bs9eqx0gcTmBg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:02:00+02:00",
"author": "request_owner"
},
{
"id": "05987ceeec0d434c99568077dc15c9a6",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(3).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/29ec040bd85647289a6f7627985f4970?Signature=oskLJCq7LX%2F8vlfsSoOiMpRSIbTAoXU4CB%2FpjLh%2FjqEbYXOBRDATxl6vu%2FHJ5VJXYiE6WspuJGWt8JMbQjzkBw%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "monitoring_owner"
}
],
"parties": [
{
"id": "133e7ada35564da3bd5da0c54d57f212",
"name": "party name",
"datePublished": "2018-01-01T02:00:00+02:00",
"roles": [
"public"
]
}
],
"id": "6270491497034cc79fe4a00e1b7b84f1"
}
}
But hidden parties fields would be visible for reviewer and you’ll need an access token to see it:
Примітка
Next action allowed to users that belongs to next auth group:
sas
public
GET /api/2.5/requests/6270491497034cc79fe4a00e1b7b84f1 HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": {
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"answer": "There is my answer",
"dateAnswered": "2018-01-01T02:03:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"dateCreated": "2018-01-01T02:00:00+02:00",
"requestId": "UA-R-2018-01-01-000001",
"tenderId": "ffffffffffffffffffffffffffffffff",
"documents": [
{
"id": "5be38e76a17d479e913a0a8b47432e23",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=yU3LyBGl1zeg6mlMzWaMBl4KwCcfNeO58fmJDoFzvI4Cn30VJwDjDhwNW1%2FNZvXQ3lExaIcz0VPygSbWv1vkAg%3D%3D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:00:00+02:00",
"dateModified": "2018-01-01T02:00:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(1).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6e4e052020524377a5d5c66c08000ba1?Signature=YFNaTNWcITSPPBImzR%252BfDMHgtJSaLVWbxJKrS8VFTR%252BSqd4L63e1rEySYJr5k%252BfNYqiLWi4NAZW%2FO1JT1LHsDg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "request_owner"
},
{
"id": "f92b51b672f743cc9f913760320624f9",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(2).json",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52c0946e8a4999929db0c4e72b2fee?Signature=aDGWSUzxCNw8%252BsEj4h77bkcZS5K8C9jN%252BHnei3NRNrtWzu0nUFqxO%2FO%2FGws8v%2F%252BS9rTXWhsww%252Bs9eqx0gcTmBg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:02:00+02:00",
"author": "request_owner"
},
{
"id": "05987ceeec0d434c99568077dc15c9a6",
"hash": "md5:00000000000000000000000000000000",
"title": "doc(3).txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/29ec040bd85647289a6f7627985f4970?Signature=oskLJCq7LX%2F8vlfsSoOiMpRSIbTAoXU4CB%2FpjLh%2FjqEbYXOBRDATxl6vu%2FHJ5VJXYiE6WspuJGWt8JMbQjzkBw%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-01T02:01:00+02:00",
"dateModified": "2018-01-01T02:01:00+02:00",
"author": "monitoring_owner"
}
],
"parties": [
{
"id": "133e7ada35564da3bd5da0c54d57f212",
"name": "party name",
"datePublished": "2018-01-01T02:00:00+02:00",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
},
"roles": [
"public"
]
}
],
"id": "6270491497034cc79fe4a00e1b7b84f1"
}
}
Lets add another request and leave it without an answer:
POST /api/2.5/requests HTTP/1.0
Authorization: Basic cHVibGljOnB1YmxpYw==
Content-Length: 918
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"tenderId": "ffffffffffffffffffffffffffffffff",
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"parties": [
{
"name": "party name",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
}
}
],
"documents": [
{
"title": "doc.txt",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/24757d61607549ccb347a76248307a82?Signature=CTpNQxTVZ5c%2BNU3F7qG%2BOpdsYSs5BFBdorcoygX2KiR70ZY%2B9VachFK3cJoCcNloHLcXKiHAoBlhgMSdqfsrDQ%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "plain/text"
}
]
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests/1a14735bf1cf4b0fa04fbb529747e76b
{
"data": {
"description": "Yo-ho-ho",
"violationType": [
"corruptionDescription",
"corruptionProcurementMethodType",
"corruptionPublicDisclosure",
"corruptionBiddingDocuments",
"documentsForm",
"corruptionAwarded",
"corruptionCancelled",
"corruptionContracting",
"corruptionChanges",
"other"
],
"dateModified": "2018-02-01T02:00:00+02:00",
"dateCreated": "2018-02-01T02:00:00+02:00",
"requestId": "UA-R-2018-02-01-000001",
"tenderId": "ffffffffffffffffffffffffffffffff",
"documents": [
{
"id": "3771cf5554b24acf85ece971dde76f6e",
"hash": "md5:00000000000000000000000000000000",
"title": "doc.txt",
"format": "plain/text",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/24757d61607549ccb347a76248307a82?Signature=CTpNQxTVZ5c%2BNU3F7qG%2BOpdsYSs5BFBdorcoygX2KiR70ZY%2B9VachFK3cJoCcNloHLcXKiHAoBlhgMSdqfsrDQ%3D%3D&KeyID=a8968c46",
"datePublished": "2018-02-01T02:00:00+02:00",
"dateModified": "2018-02-01T02:00:00+02:00",
"author": "request_owner"
}
],
"parties": [
{
"id": "47010e9a2497498396473363ba159d56",
"name": "party name",
"datePublished": "2018-02-01T02:00:00+02:00",
"address": {
"streetAddress": "test street address",
"locality": "test locality",
"region": "test region",
"postalCode": "test postalCode",
"countryName": "test country"
},
"contactPoint": {
"email": "test@example.com"
},
"roles": [
"public"
]
}
],
"id": "1a14735bf1cf4b0fa04fbb529747e76b"
}
}
Here are all available requests:
GET /api/2.5/requests?opt_fields=answer HTTP/1.0
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [
{
"answer": "There is my answer",
"id": "6270491497034cc79fe4a00e1b7b84f1",
"dateModified": "2018-01-01T02:01:00+02:00"
},
{
"id": "1a14735bf1cf4b0fa04fbb529747e76b",
"dateModified": "2018-02-01T02:00:00+02:00"
}
],
"next_page": {
"offset": "2018-02-01T02:00:00+02:00",
"path": "/api/2.5/requests?opt_fields=answer&offset=2018-02-01T02%3A00%3A00%2B02%3A00",
"uri": "http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests?opt_fields=answer&offset=2018-02-01T02%3A00%3A00%2B02%3A00"
}
}
Feed modes available:
- by default - all requests
mode=answered
- requests that have an answermode=not_answered
- requests that dont’t have an answer
For example:
GET /api/2.5/requests?mode=answered&opt_fields=answer HTTP/1.0
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [
{
"answer": "There is my answer",
"id": "6270491497034cc79fe4a00e1b7b84f1",
"dateModified": "2018-01-01T02:01:00+02:00"
}
],
"next_page": {
"offset": "2018-01-01T02:01:00+02:00",
"path": "/api/2.5/requests?mode=answered&opt_fields=answer&offset=2018-01-01T02%3A01%3A00%2B02%3A00",
"uri": "http://audit-api-sandbox.prozorro.gov.ua/api/2.5/requests?mode=answered&opt_fields=answer&offset=2018-01-01T02%3A01%3A00%2B02%3A00"
}
}