Violation Reports API Errors

Violation report in draft status

It is forbidden to post already published violation reports

POST /contracts/88888888444455556666000000000001/violation_reports HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт."
    },
    "status": "pending"
  }
}
HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-000000000004
Content-Length: 266
{
  "type": "data-validation",
  "title": "Data Validation Error",
  "details": "Validation errors in body",
  "status": 400,
  "errors": [
    {
      "type": "status_error",
      "loc": [
        "data",
        "status"
      ],
      "msg": "pending should be draft.",
      "input": "pending",
      "ctx": {
        "status": "pending"
      }
    }
  ]
}

Patching violation report with extra fields should fail.

PATCH /violation_reports/88888888444455556666000000000034 HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "tender_id": "11111111111111111111111111111111",
    "status": "pending",
    "reason": "goodsNonCompliance"
  }
}
HTTP/1.0 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-00000000000d
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.

PATCH /violation_reports/88888888444455556666000000000034 HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт."
    }
  }
}
HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-00000000000e
Content-Length: 1764
{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт.",
      "dateModified": "2025-10-12T15:35:35+03:00"
    },
    "id": "88888888444455556666000000000034",
    "violationReportID": "UA-D-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": "micro"
      }
    ],
    "authority": {
      "name": "Nicole Schmidt",
      "identifier": {
        "id": "K94288046",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "8891 Eric Station",
        "postalCode": "83706",
        "countryName": "Argentina"
      },
      "contactPoint": {
        "name": "Jeremy Wood",
        "email": "shane44@example.net",
        "telephone": "570.847.0352x0101",
        "faxNumber": "824.553.4561x9450",
        "url": "http://www.roth.com/"
      },
      "kind": "special"
    }
  }
}

DefendantStatement and Decision in draft status

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

GET /violation_reports/88888888444455556666000000000034 HTTP/1.0
Authorization: Bearer broker
HTTP/1.0 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 88888888-4444-5555-6666-000000000006
Content-Length: 1764
{
  "data": {
    "details": {
      "reason": "contractBreach",
      "description": "Постачальник порушив контракт.",
      "dateModified": "2025-10-12T15:35:35+03:00"
    },
    "id": "88888888444455556666000000000034",
    "violationReportID": "UA-D-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": "micro"
      }
    ],
    "authority": {
      "name": "Nicole Schmidt",
      "identifier": {
        "id": "K94288046",
        "scheme": "UA-EDR"
      },
      "address": {
        "streetAddress": "8891 Eric Station",
        "postalCode": "83706",
        "countryName": "Argentina"
      },
      "contactPoint": {
        "name": "Jeremy Wood",
        "email": "shane44@example.net",
        "telephone": "570.847.0352x0101",
        "faxNumber": "824.553.4561x9450",
        "url": "http://www.roth.com/"
      },
      "kind": "special"
    }
  }
}

Posting a defendant statement should fail.

POST /violation_reports/88888888444455556666000000000034/defendantStatements HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "description": "В усьому винні бобри. Обіцяли, що більше не будуть."
  }
}
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.

POST /violation_reports/88888888444455556666000000000034/defendantStatements HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "description": "В усьому винні бобри. Обіцяли, що більше не будуть."
  }
}
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.

POST /violation_reports/88888888444455556666000000000034/decisions HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "resolution": "declinedNoViolation",
    "description": "Комісія дійшла висновку, що ці карти не підпадають під гриф \"таємно\" або \"для службового користування\"."
  }
}
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.

POST /violation_reports/88888888444455556666000000000034/decisions/11111111111111111111111111111111/documents HTTP/1.0
Authorization: Bearer broker
{
  "data": {
    "title": "sign.p7s",
    "url": "http://ds.k8s.prozorro.local/get/8888888844445555666600000000000b?Signature=pmBa12rHL%2Bcw4rVkxiC84Hm6ypCJhsEjatCayJ4QRTwHRRxeTqngrgWizWCmqlGQlt2%2FfNk%2FWeJRtZal7%2BFtAQ%3D%3D&KeyID=a8968c46",
    "hash": "md5:00000000000000000000000000000000",
    "format": "application/pkcs7-signature",
    "documentType": "violationReportSignature"
  }
}
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
}