Make a DialogueΒΆ
For published monitoring we can start dialogue by publishing a post as a SAS-employee:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 465
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"title": "ipsum.doc",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/2cd40a17af5841bba79a442e11f795ce?Signature=dZf7AvbLlFWM%2B4eTpQKSd4%2B6s5A7z3xNxxLAY%2BrbKoNpMhPJ3HAPriDM5QQLlXcJtmvDbEOZr1tyzLfak1FbCw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword"
}
],
"relatedParty": "f745206183964f70a17622acdead1015"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/ca85c88b657b4bba974b037e532e581c
{
"data": {
"id": "ca85c88b657b4bba974b037e532e581c",
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "51013265fd914fa6b01a6334b95ee70c",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/2cd40a17af5841bba79a442e11f795ce?Signature=OZIGjb5iadULQ8WLskGvxx95vKWAZlty2qiwy4KtaRAXTWx%2F3lUo6FjwLwZ4juaEjnyRq3y953ReosiUYw6ODA%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:05:00+02:00",
"dateModified": "2018-01-03T02:05:00+02:00",
"author": "monitoring_owner"
}
],
"author": "monitoring_owner",
"postOf": "decision",
"datePublished": "2018-01-03T02:05:00+02:00",
"dateOverdue": "2018-01-10T00:00:00+02:00",
"relatedParty": "f745206183964f70a17622acdead1015"
}
}
We can see that postOf field was generated. Possible values of this field are:
decision- means that post is related to a decision and was added inactivemonitoring statusconclusion- means that post is related to a conclusion and was added inaddressedordeclinedmonitoring status
Also dateOverdue was generated for SAS question, that is end date for reply. This is info field and there are no validations that use this date.
Lets add another document to a post:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/ca85c88b657b4bba974b037e532e581c/documents HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 330
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "dolor.doc",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/e3e475499f57496f9eaa0c4208ea09fa?Signature=ZVS5G2ePRyanLiWuNx1WX50vJ3JVyw%2BnRxZ27%2BabDXOLTuE5C0UmWk%2B0xcf97HRS%2F2LGynO3iQdzz8aQr2D%2BAw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/ca85c88b657b4bba974b037e532e581c/documents/547bc5cf5f4a48d5b4443cefb9a62802
{
"data": {
"id": "547bc5cf5f4a48d5b4443cefb9a62802",
"hash": "md5:00000000000000000000000000000000",
"title": "dolor.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/e3e475499f57496f9eaa0c4208ea09fa?Signature=ALKprZk49GxoDAKeh6uMrNr4typhugl4A%252BuGNe6o8k4hExglSDziU6nSHNFdD6rL4yxABp3zCFkTjcTs9c3EAQ%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:10:00+02:00",
"dateModified": "2018-01-03T02:10:00+02:00",
"author": "monitoring_owner"
}
}
We also can get a list of all post documents:
GET /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/ca85c88b657b4bba974b037e532e581c/documents HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [
{
"id": "51013265fd914fa6b01a6334b95ee70c",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/2cd40a17af5841bba79a442e11f795ce?Signature=OZIGjb5iadULQ8WLskGvxx95vKWAZlty2qiwy4KtaRAXTWx%2F3lUo6FjwLwZ4juaEjnyRq3y953ReosiUYw6ODA%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:05:00+02:00",
"dateModified": "2018-01-03T02:05:00+02:00",
"author": "monitoring_owner"
},
{
"id": "547bc5cf5f4a48d5b4443cefb9a62802",
"hash": "md5:00000000000000000000000000000000",
"title": "dolor.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/e3e475499f57496f9eaa0c4208ea09fa?Signature=ALKprZk49GxoDAKeh6uMrNr4typhugl4A%252BuGNe6o8k4hExglSDziU6nSHNFdD6rL4yxABp3zCFkTjcTs9c3EAQ%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:10:00+02:00",
"dateModified": "2018-01-03T02:10:00+02:00",
"author": "monitoring_owner"
}
]
}
To answer the question as a broker we must get Credentials first. Now lets add an answer using generated token. To link the answer to a question we should pass id of the question post as relatedPost:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts?acc_token=ab906ad83e9c4acd9b9c06215f87bfe6 HTTP/1.0
Authorization: Basic YnJva2VyOmJyb2tlcg==
Content-Length: 115
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "Sit amet",
"description": "Dolor sit amet",
"relatedPost": "ca85c88b657b4bba974b037e532e581c"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/0dd18f852fcf43e28a7fd7fc2c0dc2a1
{
"data": {
"id": "0dd18f852fcf43e28a7fd7fc2c0dc2a1",
"title": "Sit amet",
"description": "Dolor sit amet",
"author": "tender_owner",
"postOf": "decision",
"datePublished": "2018-01-04T02:05:00+02:00",
"relatedPost": "ca85c88b657b4bba974b037e532e581c"
}
}
And also add documents:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/0dd18f852fcf43e28a7fd7fc2c0dc2a1/documents?acc_token=ab906ad83e9c4acd9b9c06215f87bfe6 HTTP/1.0
Authorization: Basic YnJva2VyOmJyb2tlcg==
Content-Length: 324
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "dolor.doc",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/83faf0d5f4004f01b2e562679199c1b8?Signature=z6lkO95ggh1GNSdmGrGuQJ3N5HxUFnv7p28E9nvTN7M8rOThpDGuxQAXbXcY7xZ%2Bee5IyDV1DX%2FNb1IUUVvOAw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/0dd18f852fcf43e28a7fd7fc2c0dc2a1/documents/74ebb22006f044fa80ab4f0199904b51
{
"data": {
"id": "74ebb22006f044fa80ab4f0199904b51",
"hash": "md5:00000000000000000000000000000000",
"title": "dolor.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/83faf0d5f4004f01b2e562679199c1b8?Signature=59snop57nhF26jElfWMW%2FCauRC0ehCgb0Dn6uheF7CTVZuTT9NQjcUwf%252BLgahIQvq3fA8mej78djaJviZjf9Bg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T02:10:00+02:00",
"dateModified": "2018-01-04T02:10:00+02:00",
"author": "tender_owner"
}
}
Also we can create another question as a broker by publishing an another post:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts?acc_token=ab906ad83e9c4acd9b9c06215f87bfe6 HTTP/1.0
Authorization: Basic YnJva2VyOmJyb2tlcg==
Content-Length: 416
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "Dolor sit amet",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"title": "ipsum.doc",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d9dfc2c426b456286be167a967fbd6a?Signature=ybVQMi2kvldsPRz%2FLw0GS2IoGUOVQvRtjdxl8kaQUEpuj0Ll1MbM5q%2BpzW0CBuNKS2gH%2BfxeWb61Tboa6tWXBw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword"
}
]
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/886a5cdd71dc416faaf90c28eedbf742
{
"data": {
"id": "886a5cdd71dc416faaf90c28eedbf742",
"title": "Dolor sit amet",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "748a11ca06fc4d468c610ee8fae035d0",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d9dfc2c426b456286be167a967fbd6a?Signature=wE5QGkk2ZlD%252BDfZp29sUm45hXL%2FPd3%252B11xiGtqLeecvKhDCRbLPmSE%2FoIfxbVsDWzX2VyI5PiXtzJdpqZoggDQ%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T03:05:00+02:00",
"dateModified": "2018-01-04T03:05:00+02:00",
"author": "tender_owner"
}
],
"author": "tender_owner",
"postOf": "decision",
"datePublished": "2018-01-04T03:05:00+02:00"
}
}
And also SAS-employee can publish an answer post:
POST /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 520
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
"data": {
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"relatedPost": "886a5cdd71dc416faaf90c28eedbf742",
"documents": [
{
"title": "ipsum.doc",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/36416c318acb45dbba01c97799721ede?Signature=BpijMczgV2%2Ba8l9Uv8n5py68%2Bu%2FtEUZ7M5LvhszQnuMRkW3sYY3rhVuD6oCrY4ou61%2B3JjgRX5NUufI%2FOBbyCw%3D%3D&KeyID=a8968c46",
"hash": "md5:00000000000000000000000000000000",
"format": "application/msword"
}
],
"relatedParty": "f745206183964f70a17622acdead1015"
}
}
Response: 201 Created
Content-Type: application/json
Location: http://audit-api-sandbox.prozorro.gov.ua/api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts/75c8163ecd55417ea04507ed1071bed5
{
"data": {
"id": "75c8163ecd55417ea04507ed1071bed5",
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "8247f603a3114154a55a3350993c126a",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/36416c318acb45dbba01c97799721ede?Signature=TUXCWgdzOCex4VH1d%252Bbo0VpteFDidQoRb0E2wi3q3N1I1Ro1Jx711%252Bm1ekCRDK39VwH3qUQO3ABIL0NhojNVBA%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T03:15:00+02:00",
"dateModified": "2018-01-04T03:15:00+02:00",
"author": "monitoring_owner"
}
],
"author": "monitoring_owner",
"postOf": "decision",
"datePublished": "2018-01-04T03:15:00+02:00",
"relatedPost": "886a5cdd71dc416faaf90c28eedbf742",
"relatedParty": "f745206183964f70a17622acdead1015"
}
}
Lets see all posts we have:
GET /api/2.5/monitorings/c715421038304838a046654fa8c1e9aa/posts HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Host: audit-api-sandbox.prozorro.gov.ua
Response: 200 OK
Content-Type: application/json
{
"data": [
{
"id": "ca85c88b657b4bba974b037e532e581c",
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "51013265fd914fa6b01a6334b95ee70c",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/2cd40a17af5841bba79a442e11f795ce?Signature=OZIGjb5iadULQ8WLskGvxx95vKWAZlty2qiwy4KtaRAXTWx%2F3lUo6FjwLwZ4juaEjnyRq3y953ReosiUYw6ODA%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:05:00+02:00",
"dateModified": "2018-01-03T02:05:00+02:00",
"author": "monitoring_owner"
},
{
"id": "547bc5cf5f4a48d5b4443cefb9a62802",
"hash": "md5:00000000000000000000000000000000",
"title": "dolor.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/e3e475499f57496f9eaa0c4208ea09fa?Signature=ALKprZk49GxoDAKeh6uMrNr4typhugl4A%252BuGNe6o8k4hExglSDziU6nSHNFdD6rL4yxABp3zCFkTjcTs9c3EAQ%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-03T02:10:00+02:00",
"dateModified": "2018-01-03T02:10:00+02:00",
"author": "monitoring_owner"
}
],
"author": "monitoring_owner",
"postOf": "decision",
"datePublished": "2018-01-03T02:05:00+02:00",
"dateOverdue": "2018-01-10T00:00:00+02:00",
"relatedParty": "f745206183964f70a17622acdead1015"
},
{
"id": "0dd18f852fcf43e28a7fd7fc2c0dc2a1",
"title": "Sit amet",
"description": "Dolor sit amet",
"documents": [
{
"id": "74ebb22006f044fa80ab4f0199904b51",
"hash": "md5:00000000000000000000000000000000",
"title": "dolor.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/83faf0d5f4004f01b2e562679199c1b8?Signature=59snop57nhF26jElfWMW%2FCauRC0ehCgb0Dn6uheF7CTVZuTT9NQjcUwf%252BLgahIQvq3fA8mej78djaJviZjf9Bg%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T02:10:00+02:00",
"dateModified": "2018-01-04T02:10:00+02:00",
"author": "tender_owner"
}
],
"author": "tender_owner",
"postOf": "decision",
"datePublished": "2018-01-04T02:05:00+02:00",
"relatedPost": "ca85c88b657b4bba974b037e532e581c"
},
{
"id": "886a5cdd71dc416faaf90c28eedbf742",
"title": "Dolor sit amet",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "748a11ca06fc4d468c610ee8fae035d0",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d9dfc2c426b456286be167a967fbd6a?Signature=wE5QGkk2ZlD%252BDfZp29sUm45hXL%2FPd3%252B11xiGtqLeecvKhDCRbLPmSE%2FoIfxbVsDWzX2VyI5PiXtzJdpqZoggDQ%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T03:05:00+02:00",
"dateModified": "2018-01-04T03:05:00+02:00",
"author": "tender_owner"
}
],
"author": "tender_owner",
"postOf": "decision",
"datePublished": "2018-01-04T03:05:00+02:00"
},
{
"id": "75c8163ecd55417ea04507ed1071bed5",
"title": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet.",
"documents": [
{
"id": "8247f603a3114154a55a3350993c126a",
"hash": "md5:00000000000000000000000000000000",
"title": "ipsum.doc",
"format": "application/msword",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/36416c318acb45dbba01c97799721ede?Signature=TUXCWgdzOCex4VH1d%252Bbo0VpteFDidQoRb0E2wi3q3N1I1Ro1Jx711%252Bm1ekCRDK39VwH3qUQO3ABIL0NhojNVBA%253D%253D&KeyID=a8968c46",
"datePublished": "2018-01-04T03:15:00+02:00",
"dateModified": "2018-01-04T03:15:00+02:00",
"author": "monitoring_owner"
}
],
"author": "monitoring_owner",
"postOf": "decision",
"datePublished": "2018-01-04T03:15:00+02:00",
"relatedPost": "886a5cdd71dc416faaf90c28eedbf742",
"relatedParty": "f745206183964f70a17622acdead1015"
}
]
}
