Violation Reports API Errors

DefendantStatement and Decision in draft status

If a violation report is in draft status, it’s is not public yet.

Request

GET /violation_reports/UA-2025-10-12-000001 HTTP/1.0
Authorization: Bearer broker

Response

HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-000000000005
Content-Length: 1705

{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт.",
      "dateModified": "2025-10-12T15:35:35+03:00"
    },
    "id": "UA-2025-10-12-000001",
    "status": "draft",
    "tender_id": "88888888444455556666000000000002",
    "contract_id": "88888888444455556666000000000001",
    "dateCreated": "2025-10-12T15:35:35+03:00",
    "dateModified": "2025-10-12T15:35:35+03:00",
    "author": {
      "name": "Adam Bryan",
      "identifier": {
        "id": "534962516",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "298 Michael Street Apt. 869",
        "postalCode": "66552",
        "countryName": "Chad"
      },
      "contactPoint": {
        "name": "Nathan Lee",
        "email": "marc75@example.org",
        "telephone": "560.702.9241x61926",
        "faxNumber": "8314738249",
        "url": "http://www.lucero-collier.com/"
      },
      "kind": "general"
    },
    "defendants": [
      {
        "name": "Hannah Peterson",
        "identifier": {
          "id": "500071620",
          "scheme": "UA-EDR"
        },
        "address": {
          "streetAddress": "81790 Connie Islands Suite 835",
          "postalCode": "87381",
          "countryName": "Qatar"
        },
        "contactPoint": {
          "name": "Chase Simpson",
          "email": "jerry22@example.com",
          "telephone": "(381)680-2072",
          "faxNumber": "461.576.2320x55262",
          "url": "https://wilson-schneider.com/"
        },
        "scale": "large"
      }
    ],
    "authority": {
      "name": "Chad Shannon",
      "identifier": {
        "id": "942880460",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "891 Eric Station Apt. 475",
        "postalCode": "53164",
        "countryName": "Gambia"
      },
      "contactPoint": {
        "name": "Dennis Mclaughlin",
        "email": "cwilliams@example.org",
        "telephone": "852.901.0193",
        "faxNumber": "(645)734-5619",
        "url": "http://martin.com/"
      },
      "kind": "central"
    }
  }
}

Posting a defendant statement should fail.

Request

POST /violation_reports/UA-2025-10-12-000001/defendantStatements HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "description": "В усьому винні бобри. Обіцяли, що більше не будуть."
  }
}

Response

HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 189

{
  "type": "http-bad-request",
  "title": "Bad Request",
  "details": "Can add defendantStatement only during defendantPeriod.",
  "status": 400,
  "now": "2023-10-10T01:00:00+03:00",
  "period": null
}

Posting a defendant statement document should fail as well.

Request

POST /violation_reports/UA-2025-10-12-000001/defendantStatements HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "description": "В усьому винні бобри. Обіцяли, що більше не будуть."
  }
}

Response

HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 189

{
  "type": "http-bad-request",
  "title": "Bad Request",
  "details": "Can add defendantStatement only during defendantPeriod.",
  "status": 400,
  "now": "2023-10-10T01:00:00+03:00",
  "period": null
}

Posting a decision should fail.

Request

POST /violation_reports/UA-2025-10-12-000001/decisions HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "resolution": "declinedNoViolation",
    "description": "Комісія дійшла висновку, що ці карти не підпадають під гриф \"таємно\" або \"для службового користування\"."
  }
}

Response

HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 189

{
  "type": "http-bad-request",
  "title": "Bad Request",
  "details": "Can change decision only after defendantPeriod.endDate.",
  "status": 400,
  "now": "2023-10-10T01:00:00+03:00",
  "period": null
}

Posting a decision document should also fail.

Request

POST /violation_reports/UA-2025-10-12-000001/decisions/11111111111111111111111111111111/documents HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "title": "sign.p7s",
    "url": "http://ds.k8s.prozorro.local/get/8888888844445555666600000000000a?Signature=uc6ZyZsTuIdBtCnn%2F3FqiDnKyUCpjYwNQP2dAG3Xy4LSxRaWiQCr0DXiaOZIXb%2B%2FW11AQ%2B3nXVNVgHlbGPzWCg%3D%3D&KeyID=a8968c46",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pkcs7-signature",
    "documentType": "violationReportSignature"
  }
}

Response

HTTP/1.0 404 Not Found
Content-Type: application/json; charset=utf-8
Content-Length: 97

{
  "type": "http-not-found",
  "title": "Not Found",
  "details": "decision not found.",
  "status": 404
}

Violation report in draft status

Patching violation report with extra fields should fail.

Request

PATCH /violation_reports/UA-2025-10-12-000001 HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "tender_id": "11111111111111111111111111111111",
    "status": "pending",
    "reason": "goodsNonCompliance"
  }
}

Response

HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-00000000000c
Content-Length: 1220

{
  "type": "data-validation",
  "title": "Data Validation Error",
  "details": "Validation errors in body",
  "status": 400,
  "errors": [
    {
      "type": "missing",
      "loc": [
        "data",
        "ViolationReportPatchDetailsRequestData",
        "details"
      ],
      "msg": "Field required",
      "input": {
        "tender_id": "11111111111111111111111111111111",
        "status": "pending",
        "reason": "goodsNonCompliance"
      }
    },
    {
      "type": "extra_forbidden",
      "loc": [
        "data",
        "ViolationReportPatchDetailsRequestData",
        "tender_id"
      ],
      "msg": "Extra inputs are not permitted",
      "input": "11111111111111111111111111111111"
    },
    {
      "type": "extra_forbidden",
      "loc": [
        "data",
        "ViolationReportPatchDetailsRequestData",
        "status"
      ],
      "msg": "Extra inputs are not permitted",
      "input": "pending"
    },
    {
      "type": "extra_forbidden",
      "loc": [
        "data",
        "ViolationReportPatchDetailsRequestData",
        "reason"
      ],
      "msg": "Extra inputs are not permitted",
      "input": "goodsNonCompliance"
    },
    {
      "type": "extra_forbidden",
      "loc": [
        "data",
        "ViolationReportPublishRequestData",
        "tender_id"
      ],
      "msg": "Extra inputs are not permitted",
      "input": "11111111111111111111111111111111"
    },
    {
      "type": "extra_forbidden",
      "loc": [
        "data",
        "ViolationReportPublishRequestData",
        "reason"
      ],
      "msg": "Extra inputs are not permitted",
      "input": "goodsNonCompliance"
    }
  ]
}

Patching violation report with no changes should succeed while dateModified should be the same.

Request

PATCH /violation_reports/UA-2025-10-12-000001 HTTP/1.0
Authorization: Bearer broker

{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт."
    }
  }
}

Response

HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-00000000000d
Content-Length: 1705

{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт.",
      "dateModified": "2025-10-12T15:35:35+03:00"
    },
    "id": "UA-2025-10-12-000001",
    "status": "draft",
    "tender_id": "88888888444455556666000000000002",
    "contract_id": "88888888444455556666000000000001",
    "dateCreated": "2025-10-12T15:35:35+03:00",
    "dateModified": "2025-10-12T15:35:35+03:00",
    "author": {
      "name": "Adam Bryan",
      "identifier": {
        "id": "534962516",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "298 Michael Street Apt. 869",
        "postalCode": "66552",
        "countryName": "Chad"
      },
      "contactPoint": {
        "name": "Nathan Lee",
        "email": "marc75@example.org",
        "telephone": "560.702.9241x61926",
        "faxNumber": "8314738249",
        "url": "http://www.lucero-collier.com/"
      },
      "kind": "general"
    },
    "defendants": [
      {
        "name": "Hannah Peterson",
        "identifier": {
          "id": "500071620",
          "scheme": "UA-EDR"
        },
        "address": {
          "streetAddress": "81790 Connie Islands Suite 835",
          "postalCode": "87381",
          "countryName": "Qatar"
        },
        "contactPoint": {
          "name": "Chase Simpson",
          "email": "jerry22@example.com",
          "telephone": "(381)680-2072",
          "faxNumber": "461.576.2320x55262",
          "url": "https://wilson-schneider.com/"
        },
        "scale": "large"
      }
    ],
    "authority": {
      "name": "Chad Shannon",
      "identifier": {
        "id": "942880460",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "891 Eric Station Apt. 475",
        "postalCode": "53164",
        "countryName": "Gambia"
      },
      "contactPoint": {
        "name": "Dennis Mclaughlin",
        "email": "cwilliams@example.org",
        "telephone": "852.901.0193",
        "faxNumber": "(645)734-5619",
        "url": "http://martin.com/"
      },
      "kind": "central"
    }
  }
}