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: 1232
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",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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/3a613f38dfbc4d3da9032846b6f75aee
{
  "data": {
    "description": "Yo-ho-ho",
    "violationType": [
      "corruptionDescription",
      "corruptionProcurementMethodType",
      "corruptionPublicDisclosure",
      "corruptionBiddingDocuments",
      "documentsForm",
      "corruptionAwarded",
      "corruptionCancelled",
      "corruptionContracting",
      "corruptionChanges",
      "other",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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": "d37ec4a82f43470688f905e93ba39eac",
        "hash": "md5:00000000000000000000000000000000",
        "title": "doc.txt",
        "format": "plain/text",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=OZBoQZnZihQIpBoi5eojoquIpAe3DJoXrSnxl%252BvDwpywgysRKjdf8VoI8jgqu87vJJVcPhLLc90vuSOZuEJqCg%253D%253D&KeyID=a8968c46",
        "datePublished": "2018-01-01T02:00:00+02:00",
        "dateModified": "2018-01-01T02:00:00+02:00",
        "author": "request_owner"
      }
    ],
    "parties": [
      {
        "id": "e891c55b34c84e38a3a61ef86988772d",
        "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": "3a613f38dfbc4d3da9032846b6f75aee"
  }
}

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/3a613f38dfbc4d3da9032846b6f75aee/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/3a613f38dfbc4d3da9032846b6f75aee/documents/7c73ad5badbf4288bd24bac55e3ac5e6
{
  "data": {
    "id": "7c73ad5badbf4288bd24bac55e3ac5e6",
    "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/3a613f38dfbc4d3da9032846b6f75aee/documents/7c73ad5badbf4288bd24bac55e3ac5e6 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": "7c73ad5badbf4288bd24bac55e3ac5e6",
    "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/3a613f38dfbc4d3da9032846b6f75aee HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 73
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "answer": "monitoringCreated",
    "reason": "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",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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": "d37ec4a82f43470688f905e93ba39eac",
        "hash": "md5:00000000000000000000000000000000",
        "title": "doc.txt",
        "format": "plain/text",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=OZBoQZnZihQIpBoi5eojoquIpAe3DJoXrSnxl%252BvDwpywgysRKjdf8VoI8jgqu87vJJVcPhLLc90vuSOZuEJqCg%253D%253D&KeyID=a8968c46",
        "datePublished": "2018-01-01T02:00:00+02:00",
        "dateModified": "2018-01-01T02:00:00+02:00",
        "author": "request_owner"
      },
      {
        "id": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "e891c55b34c84e38a3a61ef86988772d",
        "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"
        ]
      }
    ],
    "reason": "There is my answer",
    "answer": "monitoringCreated",
    "id": "3a613f38dfbc4d3da9032846b6f75aee"
  }
}

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/3a613f38dfbc4d3da9032846b6f75aee/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/3a613f38dfbc4d3da9032846b6f75aee/documents/5a9cd90adb28475381fa35f33422c7b8
{
  "data": {
    "id": "5a9cd90adb28475381fa35f33422c7b8",
    "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/3a613f38dfbc4d3da9032846b6f75aee/documents HTTP/1.0
Host: audit-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json
{
  "data": [
    {
      "id": "d37ec4a82f43470688f905e93ba39eac",
      "hash": "md5:00000000000000000000000000000000",
      "title": "doc.txt",
      "format": "plain/text",
      "url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=OZBoQZnZihQIpBoi5eojoquIpAe3DJoXrSnxl%252BvDwpywgysRKjdf8VoI8jgqu87vJJVcPhLLc90vuSOZuEJqCg%253D%253D&KeyID=a8968c46",
      "datePublished": "2018-01-01T02:00:00+02:00",
      "dateModified": "2018-01-01T02:00:00+02:00",
      "author": "request_owner"
    },
    {
      "id": "5a9cd90adb28475381fa35f33422c7b8",
      "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": "7c73ad5badbf4288bd24bac55e3ac5e6",
      "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/3a613f38dfbc4d3da9032846b6f75aee HTTP/1.0
Authorization: Basic dGVzdF9zYXM6dGVzdF9zYXNfdG9rZW4=
Content-Length: 50
Content-Type: application/json
Host: audit-api-sandbox.prozorro.gov.ua
DATA:
{
  "data": {
    "reason": "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/3a613f38dfbc4d3da9032846b6f75aee 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",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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": "d37ec4a82f43470688f905e93ba39eac",
        "hash": "md5:00000000000000000000000000000000",
        "title": "doc.txt",
        "format": "plain/text",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=OZBoQZnZihQIpBoi5eojoquIpAe3DJoXrSnxl%252BvDwpywgysRKjdf8VoI8jgqu87vJJVcPhLLc90vuSOZuEJqCg%253D%253D&KeyID=a8968c46",
        "datePublished": "2018-01-01T02:00:00+02:00",
        "dateModified": "2018-01-01T02:00:00+02:00",
        "author": "request_owner"
      },
      {
        "id": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "5a9cd90adb28475381fa35f33422c7b8",
        "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": "e891c55b34c84e38a3a61ef86988772d",
        "name": "party name",
        "datePublished": "2018-01-01T02:00:00+02:00",
        "roles": [
          "public"
        ]
      }
    ],
    "reason": "There is my answer",
    "answer": "monitoringCreated",
    "id": "3a613f38dfbc4d3da9032846b6f75aee"
  }
}

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/3a613f38dfbc4d3da9032846b6f75aee 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",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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": "d37ec4a82f43470688f905e93ba39eac",
        "hash": "md5:00000000000000000000000000000000",
        "title": "doc.txt",
        "format": "plain/text",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/df1080bf9c774ba4b27f28f1d5b9c652?Signature=OZBoQZnZihQIpBoi5eojoquIpAe3DJoXrSnxl%252BvDwpywgysRKjdf8VoI8jgqu87vJJVcPhLLc90vuSOZuEJqCg%253D%253D&KeyID=a8968c46",
        "datePublished": "2018-01-01T02:00:00+02:00",
        "dateModified": "2018-01-01T02:00:00+02:00",
        "author": "request_owner"
      },
      {
        "id": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "7c73ad5badbf4288bd24bac55e3ac5e6",
        "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": "5a9cd90adb28475381fa35f33422c7b8",
        "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": "e891c55b34c84e38a3a61ef86988772d",
        "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"
        ]
      }
    ],
    "reason": "There is my answer",
    "answer": "monitoringCreated",
    "id": "3a613f38dfbc4d3da9032846b6f75aee"
  }
}

Lets add another request and leave it without an answer:

POST /api/2.5/requests HTTP/1.0
Authorization: Basic cHVibGljOnB1YmxpYw==
Content-Length: 1236
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",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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/5b49e3b37d5a4d0fa4d5436b56d64ea2
{
  "data": {
    "description": "Yo-ho-ho",
    "violationType": [
      "corruptionDescription",
      "corruptionProcurementMethodType",
      "corruptionPublicDisclosure",
      "corruptionBiddingDocuments",
      "documentsForm",
      "corruptionAwarded",
      "corruptionCancelled",
      "corruptionContracting",
      "corruptionChanges",
      "other",
      "corruptionUntimely",
      "corruptionBidSecurity",
      "corruptionFailureDocuments",
      "corruptionConsideration",
      "servicesWithoutProcurementProcedure",
      "useProceduresNotByLaw",
      "rejectionOfBidsNotByLaw",
      "inaccuratePersonalData",
      "deadlineForThePublicationDocumentation",
      "notComplyDecisionACU",
      "contractsWithoutProcurement"
    ],
    "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": "ec13bed5d4c04438b38e17d3261db9d0",
        "hash": "md5:00000000000000000000000000000000",
        "title": "doc.txt",
        "format": "plain/text",
        "url": "http://public-docs-sandbox.prozorro.gov.ua/get/24757d61607549ccb347a76248307a82?Signature=KwQl3l5ZjU3gWdFGfQnv4TUEFPmo4%252BhMVoDTa5pra7OFsspFEkCJrmHXGpPOww5R%252BEx6l8EEQsVjWPELfSl%252BBw%253D%253D&KeyID=a8968c46",
        "datePublished": "2018-02-01T02:00:00+02:00",
        "dateModified": "2018-02-01T02:00:00+02:00",
        "author": "request_owner"
      }
    ],
    "parties": [
      {
        "id": "4094990dcf4d4195a63e5e008b02f304",
        "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": "5b49e3b37d5a4d0fa4d5436b56d64ea2"
  }
}

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": "monitoringCreated",
      "id": "3a613f38dfbc4d3da9032846b6f75aee",
      "dateModified": "2018-01-01T02:01:00+02:00"
    },
    {
      "id": "5b49e3b37d5a4d0fa4d5436b56d64ea2",
      "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 answer
  • mode=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": "monitoringCreated",
      "id": "3a613f38dfbc4d3da9032846b6f75aee",
      "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"
  }
}