production-approval-tests

Endpoint to be used to run the Production Approval Tests for one or more Waste Tracking IDs.

Changed on

Submit one or more Production Approval Test scenarios for validation.<br> Each scenario is validated independently. The response contains a result for every scenario submitted.<br> A 200 OK response means that the request was processed. It does not mean that every scenario passed. Check the status and message returned for each result.<br> The same Waste Tracking ID may be used for different scenario IDs, but each scenario ID may appear only once in a request.<br> Rejection scenarios C01 and H02 cannot be submitted through this endpoint because they do not generate Waste Tracking IDs.<br> This endpoint is available in the External Test environment only. It is not available in the Production environment.

post/production-approval-tests

Request

  • Base URL
    https://waste-tracking.integration.api.defra.gov.uk
  • URL
    https://waste-tracking.integration.api.defra.gov.uk/production-approval-tests
  • Auth
    HTTP bearer

Request body

scenarioId'R01' | 'R02' | 'R03' | 'R04' | 'R05' | 'R07' | 'C02' | 'B01' | 'P01' | 'H01' | 'H03' | 'X01' required

The identifier of the Production Approval Test scenario being submitted for validation.<br> The scenario identifier is included in the corresponding result returned by the API.<br> <p><font color="green"><b>Business Rules:</b></font></p> <ul> <li>The value must be one of the supported PAT scenario identifiers.</li> <li>Each <b>scenarioId</b> must appear only once within a request.</li> <li>Rejection scenarios C01 and H02 cannot be submitted because they do not generate a Waste Tracking ID.</li> </ul>

wasteTrackingIdstring required

The waste tracking ID associated with the scenario. <p><font color="green"><b>Business Rules:</b></font></p> <ul> <li>The Waste Tracking ID must be supplied as a string.</li> <li>Only one Waste Tracking ID can be supplied for each scenario.</li> <li>The same Waste Tracking ID may be submitted for different scenarios.</li> <li>The Waste Tracking ID must exist and be available to the software provider submitting the request.</li> </ul>

Example request

[
  {
    "scenarioId": "R01",
    "wasteTrackingId": "25HRA0B2"
  }
]

Response

The Production Approval Test scenarios were processed successfully.

A result is returned for every scenario submitted. Review the status and message in each result to determine whether an individual scenario passed or failed.

submissionIdstring

A unique identifier for this PAT validation submission.<br> Treat this value as an opaque identifier. Do not attempt to derive information from its format.

Example response

{
  "submissionId": "6a75b4bbe8624f6a79240d78",
  "results": [
    {
      "scenarioId": "R01",
      "wasteTrackingId": "26BHUT6U",
      "status": "Pass",
      "message": ""
    },
    {
      "scenarioId": "R02",
      "wasteTrackingId": "26BHUT6U",
      "status": "Fail",
      "message": "Expected more than 1 waste item for R02, found 1"
    }
  ]
}

Changes