openapi: "3.0.3" info: title: Digital Waste Tracking Receipt API version: "1.0" description: |
This API is for waste receivers, software developers and third party software users. It enables operators of permitted or licensed waste receiving sites to report details of each waste movement arriving at their site. This will be mandatory from October 2026. More information about Digital Waste Tracking is available here:
The API is based on REST principles and uses seven endpoints: POST, PUT and five GET methods that return data in JSON format. It uses standard HTTP error response codes.
The API POST method is used to create a record for a waste movement that has arrived at a waste receiving site. It returns a waste tracking ID and a validation result.
The API PUT method is used to update a waste tracking record using a waste tracking ID to identify the movement. It returns a validation result.
The first GET method is used to retrieve a list of European Waste Codes (EWC).
The second GET method is used to retrieve a list of Hazardous Property Codes (called Special Waste Codes in Scotland).
The third GET method is used to retrieve a list of Disposal or Recovery codes.
The fourth GET method is used to retrieve a list of Container Types.
The fifth GET method is used to retrieve a list of POP (Persistent Organic Pollutant) name codes.
isHazardous
This boolean field indicates whether the waste code is classified as hazardous waste (true) or non-hazardous waste (false). This classification is crucial for regulatory compliance and handling procedures.
entryTypeDesc
This describes the type of entry for the waste code. It indicates whether the entry is:
- Absolute hazardous (always hazardous, marked with *)
- Absolute non-hazardous (never hazardous)
- Dual code entry (hazardous or non-hazardous depending on composition).This classification is important for determining if additional assessment is needed.
chapter
Refers to the first two digits of the six-digit List of Waste (LoW) code. It defines the main category of waste, usually based on the industry or process generating the waste.
Example:
01 – Wastes from mining and physical/chemical treatment of minerals
10 – Wastes from thermal processes
subChapter
Corresponds to the third and fourth digits of the LoW code. It narrows down the category to a more specific process or material within the chapter.
Example:
10 02 – Wastes from the iron and steel industry
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: string
description: |
The EWC code.
example: 010101
isHazardous:
type: boolean
description: True if the EWC code is for hazardous waste, otherwise False. The full list of valid EWC codes is returned by the GET ewc-codes method.
example: true
entryTypeDesc:
type: string
description: The EWC code entry type description.
example: Absolute non-hazardous
chapter:
type: string
description: The EWC code chapter.
example: Wastes resulting from exploration, mining, quarrying, and physical and chemical treatment of minerals
subChapter:
type: string
description: The EWC code sub-chapter.
example: Wastes from mineral excavation
description:
type: string
description: The EWC code description.
example: Wastes from mineral metalliferous excavation
/reference-data/hazardous-property-codes:
get:
description: |
Endpoint used to get a list of hazardous property codes. It returns a code list on 200 success or a 401 on failure.
Example Request
```json
curl --request GET \--url https://waste-tracking.api.defra.gov.uk/reference-data/hazardous-property-codes \
--header "authorization": Bearer eyJraWQiOiJQYnJiZXZvYUF5d1NQcG5KUWlsQXVCT1Q4aVdyNUFcL3RaQkZHaTk5TU5CTT0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIybHRldXNlaHN...
```
responses:
"200":
description: |
A truncated list of hazardous property codes obtained using the GET hazardous-property-codes method
```json
[
{
"code": "HP_1",
"shortDesc": "Explosive",
"longDesc": "Waste that can cause dangerous chemical reactions, producing gas that can damage surroundings (e.g., pyrotechnic or self-reactive waste)."
},
{
"code": "HP_2",
"shortDesc": "Oxidizing",
"longDesc": "Waste that can provide oxygen, causing or contributing to the combustion of other materials."
}, ... cont
```
The response fields: "shortDesc" and "longDesc"
shortDesc (Short Description)
- A concise label or summary of the hazardous property.
- Usually just a few words or a short phrase.
- Intended for quick identification in tables, lists, or UI elements.
Example: "Flammable Liquid" or "Acute Toxicity".
longDesc (Long Description)
- A more detailed explanation of the hazardous property.
- Provides context, definitions, or conditions under which the hazard applies.
- Often includes regulatory references or clarifications.
Key Differences:
UTC is the global time standard and does not observe daylight saving time. BST is UTC+1, used in the UK during daylight saving time (typically from late March to late October). schema: type: string format: date-time example: 2025-09-15T12:12:28z requestBodies: receiveMovementRequest: description: Details of the waste movement to be created or updated. The mandatory parameters to be included in the API call are the apiCode, dateTimeReceived, carrier, wasteItems, receiver and receipt. required: true content: application/json: schema: type: object required: - apiCode - dateTimeReceived - carrier - wasteItems - receiver - receipt properties: apiCode: type: string format: uuid description: This is a unique sixteen byte identifier for the receiving organisation. An organisation can have one or more apiCodes. The apiCodes for an organisation are produced and managed by that organisation. example: ba6eb330-4f7f-11eb-a2fb-67c34e9ac07c dateTimeReceived: type: string format: date-time description: | This is the date and exact time waste was received at the site. This API uses the UTC ISO 8601 and BST standards for machine-readable dates and times.Key Differences:
UTC is the global time standard and does not observe daylight saving time. BST is UTC+1, used in the UK during daylight saving time (typically from late March to late October). example: 2025-09-15T12:12:28z hazardousWasteConsignmentCode: type: string description: Hazardous waste consignment code. If the EWC is HAZ, then this field is mandatory.England & Wales:
Format- XXXXXX/YYYYY
Where XXXXXX can be a mixture of letters and/or numbers, i.e. alphanumeric.The consignment note code must follow the format- XXXXXX/YYYYY.
The first XXXXXX part is made up of six alphanumeric characters and must be followed by a forward slash /
The YYYYY part is a five alphanumeric character unique identifier of the users' choice (no spaces or symbols).
Scotland
Format- SA, SB or SC followed by a 7-digit number (e.g. SB1234567). Also known as Special Waste Consignment Note
Northern Ireland and Eire:
Format- DA, DB or DC followed by a 7-digit number (e.g. DA5301234)
Business Rules:
| Reason | Reason Code |
|---|---|
| Non-Haz Waste Transfer | NON_HAZ_WASTE_TRANSFER |
| No documentation provided with Waste | NO_DOC_WITH_WASTE |
| Household Wast Recycling Centre Receipt | HWRC_RECEIPT |
Business Rules:
Business Rules:
- Must be six digits (no spaces) and be in the official wasteItem.ewcCode EWC catalog EUR-Lex.Business Rule:
Must be “Gas”, “Liquid”, “Solid”, Powder”, “Sludge” or “Mixed”. Note: The field is case-sensitive, please use the case specified in the description. example: Sludge numberOfContainers: type: integer minimum: 0 nullable: false description: Number of containers for storing, transporting and disposing of waste materials.Business Rule:
This must be a non-negative integer (0 or greater). example: 2 typeOfContainers: type: string nullable: false description: | Containers are receptacles used for storing, transporting and disposing of waste materials. They come in various sizes and types, ranging from small desk-side bins to large industrial skips. Enter the container code, e.g. DRU for Drum.Business Rule:
Must be in typeOfContainers list. example: SKI weight: $ref: "#/components/schemas/weight" containsPops: type: boolean description: | Does the waste consignment contain POPs? This should be a boolean value, i.e. true or false. Persistent organic pollutants (POPs) are chemical substances that do not break down in the environment. They are a danger to human health and the environment. POPs can be present in hazardous and non-hazardous waste. example: true pops: type: object required: - sourceOfComponents properties: sourceOfComponents: type: string enum: [NOT_PROVIDED, PROVIDED_WITH_WASTE, GUIDANCE, OWN_TESTING] description: | Indicates the source of POP component details. - NOT_PROVIDED: Carrier did not provide component details - PROVIDED_WITH_WASTE: Components provided with the waste - GUIDANCE: Components determined from guidance - OWN_TESTING: Components determined from own testingBusiness Rules:
Business Rule:
Optional field. If provided, it must be a valid POP code from the reference list returned by the GET method. The code is validated against reference data to ensure accuracy. example: PFHXS concentration: type: number minimum: 0 exclusiveMinimum: true nullable: true description: | The concentration of the POP component in milligrams per kilogram (mg/kg).concentrationOperator to indicate whether the actual concentration is less than or greater than that value.
Business Rules:
- This field is optional.
- The value may be
null when no concentrationOperator is supplied.
- If a
concentrationOperator is supplied, this field is required and must contain a number.
- If a number is provided, it must be greater than 0.
- Do not include the unit of measurement or a comparison symbol in this field.
- If no operator is supplied, the number is treated as the reported concentration.
- If an operator is supplied, the number represents the comparison threshold.
example: 12.5
concentrationOperator:
type: string
enum:
- "<"
- ">"
description: |
Indicates how the actual concentration with the value provided in `concentration`.
- `<` means the actual concentration is less than the supplied value.
- `>` means the actual concentration is greater than the supplied value.
Business Rules:
- This field is optional.
- If provided,
concentration is required and must contain a number.
- Do not provide an operator when
concentration is null.
- The accepted values are
< and >.
- Other operators, including
'>' and '>', are not accepted.
example: ">"
description: |
The list of POP components.
Business Rules:
- Must be provided when wasteItem.containsPops is true
- If sourceOfComponents is NOT_PROVIDED, components array must be empty or not provided
- If sourceOfComponents is PROVIDED_WITH_WASTE, an empty components array will generate a validation warning
- If sourceOfComponents is GUIDANCE or OWN_TESTING, components are required and cannot be empty (validation error if not provided)
containsHazardous:
type: boolean
description: Does the waste consignment contain Hazardous Properties, true or false?. This is a mandatory indication. This is a boolean value, i.e. true (contains hazardous properties) or false (does not contain hazardous properties).
example: true
hazardous:
type: object
required:
- sourceOfComponents
properties:
sourceOfComponents:
type: string
enum: [NOT_PROVIDED, PROVIDED_WITH_WASTE, GUIDANCE, OWN_TESTING]
description: |
Indicates the source of hazardous component details.
- NOT_PROVIDED: Carrier did not provide component details
- PROVIDED_WITH_WASTE: Components provided with the waste
- GUIDANCE: Components determined from guidance
- OWN_TESTING: Components determined from own testing
Business Rules:
- Must be provided when wasteItem.containsHazardous is true
- If sourceOfComponents is NOT_PROVIDED, components array must be empty or not provided
- If sourceOfComponents is PROVIDED_WITH_WASTE, components are recommended but not required (validation warning if not provided)
- If sourceOfComponents is GUIDANCE or OWN_TESTING, components are required (validation error if not provided)
example: PROVIDED_WITH_WASTE
hazCodes:
type: array
description: |
Hazardous property codes are a list of codes that identify the hazardous waste and the potential risks associated with waste materials, guiding their safe transportation and handling protocols. Common types could include codes, HP_1 - HP_15. The format of the code to be entered is HP_'number', e.g. HP_1 for Explosive, HP_2 for Oxidizing, etc.
The official hazardous code list is found here in Appendix C:
Waste Classification Technical Guidance WM3 document.
Notes:
- A list of all Hazardous Property Codes can be obtained using the GET hazardous-property-codes method.
- The field is case-sensitive, please use the case specified for the code returned by the GET method.
Business Rule:
If provided, each value must be a valid hazardous property code returned by the reference-data endpoint. Codes are case-sensitive.
example:
- HP_5
- HP_10
items:
type: string
components:
type: array
items:
type: object
required:
- name
properties:
name:
type: string
description: Name of the hazardous component, e.g. Mercury.
Business Rule:
Optional field. If provided, it must be a valid chemical or biological component name.
example: lead
concentration:
type: number
minimum: 0
exclusiveMinimum: true
nullable: true
description: |
The concentration of the Hazardous component in milligrams per kilogram (mg/kg).
- Where an exact concentration is known, provide the measured value without a `concentrationOperator`.
- Where the concentration is known only to have exceeded a threshold, provide the numeric threshold in this field and use `>` as the `concentrationOperator`.
Business Rules:
- This field is optional.
- The value may be
null when no concentrationOperator is supplied.
- If a
concentrationOperator is supplied, this field is required and must contain a number.
- If a number is provided, it must be greater than 0.
- Do not include the unit of measurement or a comparison symbol in this field.
- If no operator is supplied, the number is treated as the reported concentration.
- If an operator is supplied, the number represents the threshold that was exceeded.
example: 12.5
concentrationOperator:
type: string
enum:
- ">"
description: |
Indicates that the actual concentration of the hazardous component is greater than the value supplied in
`concentration`.
The only accepted value is `>`.
Business Rules:
This field is optional.
If provided, concentration is required and must contain a number.
Do not provide an operator when concentration is null.
The only accepted value is >.
The operators <, >= and <= are not accepted.
example: ">"
disposalOrRecoveryCodes:
type: array
items:
$ref: "#/components/schemas/disposalOrRecoveryCode"
carrier:
type: object
required:
- registrationNumber
- organisationName
- meansOfTransport
properties:
registrationNumber:
type: string
nullable: true
description: |
A waste carrier registration number is a legal requirement for businesses that transport, buy, sell or dispose of waste. This license ensures that waste is handled and transported in a responsible and environmentally friendly manner.
Home Nations Codes:
General Format where 9 is a digit 0-9
Wales NRW:
CBDU999 (3+ digits)
i.e. CBDU999 (Upper Tier) or CBDL999 (Lower Tier), where "CBD" stands for "Carrier, Broker, Dealer"
England:
CBDU999 (3+ digits)
i.e. CBDU999 (Upper Tier) or CBDL999 (Lower Tier), where "CBD" stands for "Carrier, Broker, Dealer"
Scotland SEPA:
WCR/R/9999999, SCO/999999, SEA/999999, SNO/999999, SWE/999999, WCR/999999, PCT-X-999, PCT-X-9999, PCT-X-99999, PCT-X-999999 and PCT-X-9999999 (where X = a single capital letter and 9 = a single numeral of between 3 and 7 digits in length).
Typically starts with WCR followed by numbers and potentially letters according to the Scottish Environment Protection Agency (SEPA).
Current format – WCR/R/1234567
Previous formats – SCO/123456, SEA/123456, SNO/123456, SWE/123456, WCR/123456, PCT-E-083, PCT-N-0050000
Northern Ireland NI
ROC UT 9,ROC UT 99,ROC UT 999,ROC UT 9999,ROC UT 99999, ROC LT 9, ROC LT 99, ROC LT 999, ROC LT 9999, ROC LT 99999
Include a prefix like ROC followed by UT (Upper Tier) or LT (Lower Tier) and then numbers. Note the spaces are not mandatory. For example:
ROC UT 9999
ROCLT9999
General Format where 9 is a digit 0-9
example: CBDL999
reasonForNoRegistrationNumber:
type: string
description: |
If you have not provided a registration number, then here you must provide an appropriate reason code from the list below:
- ON_SITE - Movement within the same premises (e.g. waste transferred between different areas or authorisations on the same site)
- HOUSEHOLD - Householder transporting own waste (e.g. individual taking personal or household waste to a HWRC, not for profit)
- ONE_OFF - One-off or infrequent waste transport (carrier does not normally and regularly transport controlled waste)
- MARINE - Marine transport covered by a marine licence/exemption (waste moved by vessel in connection with a licensed marine operation)
Business Rules:
- If either “Null” or an empty string are entered into carrier.registrationNumber then carrier.reasonForNoRegistrationNumber is required.
- If a valid string is entered into carrier.registrationNumber then carrier.reasonForNoRegistrationNumber should not be provided.
example: ON_SITE
organisationName:
type: string
description: The business name of the carrier.
example: Waste Carriers Lite Ltd
address:
$ref: "#/components/schemas/address"
emailAddress:
type: string
format: email
description: The email address of the carrier.
example: mailbox@example.co.uk
phoneNumber:
type: string
description: The UK or international phone number of the carrier.
example: 020 4756 XXXX
vehicleRegistration:
type: string
maxLength: 10
description: This is the carrier's vehicle registration number.
Business Rules:
- If carrier.meansOfTransport is “Road” then carrier.vehicleRegistration is required.
- If carrier.meansOfTransport is not “Road” then carrier.vehicleRegistration is not applicable.
example: RNT 493
meansOfTransport:
type: string
enum: [Road, Rail, Air, Sea, Inland Waterway, Piped, Other]
description: |
This describes how the waste is transported from the carrier to the receiver.
Note: The field is case-sensitive, please use the case specified in the list.
- Road
- Rail
- Air
- Sea
- Inland Waterway
- Piped
- Other
Business Rule:
Must be one of the specified values in the list.
example: Rail
brokerOrDealer:
type: object
required:
- organisationName
properties:
organisationName:
type: string
description: The broker or dealer organisation name who arranged this transfer.
example: Waste Disposal Ltd
address:
$ref: "#/components/schemas/address"
emailAddress:
type: string
format: email
description: The email address of the broker or dealer.
example: mailbox@example.co.uk
phoneNumber:
type: string
description: The phone number of the broker or dealer.
example: 020 4756 XXXX
registrationNumber:
type: string
description: |
A waste broker or dealer who buys or sells waste or arranges the buying, selling or disposal of waste must be registered. Upon registration, a registration number is given to the organisation.
Home Nations Codes:
General Format where 9 is a digit 0-9
Wales NRW:
CBDU999 (3+ digits)
i.e. CBDU999 (Upper Tier) or CBDL999 (Lower Tier), where "CBD" stands for "Carrier, Broker, Dealer"
England:
CBDU999 (3+ digits)
i.e. CBDU999 (Upper Tier) or CBDL999 (Lower Tier), where "CBD" stands for "Carrier, Broker, Dealer"
Scotland SEPA:
WCR/R/9999999, SCO/999999, SEA/999999, SNO/999999, SWE/999999, WCR/999999 and PCT-X-999, PCT-X-9999, PCT-X-99999, PCT-X-999999 and PCT-X-9999999 (where X = a single capital letter and 9 = a single numeral of between 3 and 7 digits in length).
Typically starts with WCR followed by numbers and potentially letters according to the Scottish Environment Protection Agency (SEPA).
Current format – WCR/R/1234567
Previous formats – SCO/123456, SEA/123456, SNO/123456, SWE/123456, WCR/123456, PCT-E-083, PCT-N-0050000
Northern Ireland (NI)
ROC UT 9,ROC UT 99,ROC UT 999, ROC UT 9999, ROC UT 99999, ROC LT 9, ROC LT 99, ROC LT 999, ROC LT 9999, ROC LT 99999
Include a prefix like ROC followed by UT (Upper Tier) or LT (Lower Tier) and then numbers. Note that spaces are not mandatory.
ROC UT 9999
ROCLT9999
Note: where 9 is a digit 0-9
example: CBDL999
receiver:
type: object
required:
- siteName
- authorisationNumber
properties:
siteName:
type: string
description: The name of the site receiving the waste.
emailAddress:
type: string
description: The email address of the organisation receiving the waste.
example: mailbox@example.co.uk
phoneNumber:
type: string
description: The UK or Irish phone number of the organisation receiving the waste.
example: 020 4756 XXXX
authorisationNumber:
type: string
description: |
This is the site's authorisation (permit) number that allows it to accept waste for intended recovery and disposal operation. Only one authorisation number is required per site.
Home Nations Codes:
(where 9 is a digit 0-9, X is a letter A-Z)
England:
- EAWML99999, WML99999, EAWML999999, WML999999, EPR/XX9999XX
For Mobile Deployments, D’s prefix deployment numbers as part of permit numbers:
- XX9999XX/D9999, XX9999XX/D99999, EPR/XX9999XX/D9999, EPR/XX9999XX/D99999S
Scotland (SEPA):
- PPC/A/9999999, WML/L/9999999, PPC/A/SEPA9999-9999, PPC/W/9999999, PPC/N/9999999, PPC/E/9999999, WML/L/SEPA9999-9999, WML/W/9999999, WML/E/9999999, WML/N/9999999, WML/L/9999999/99, WML/W/9999999/99,
WML/N/9999999/99, WML/E/9999999/99, EAS/P/999999
Wales (NRW):
- XX9999XX, EPR/XX9999XX
Northern Ireland (NRI):
- P9999/99X, P9999/99X/V#, WPPC 99/99, WPPC 99/99/V#
WML 99/# PAC/9999/WCL999
WML 99/# LN/99/#
Please note the following explanation:
WML 99/# (where # could mean any positive integer)
LN/99/# (where # could mean any positive integer and can also have 01,02,---09, 10-99,100-999, etc))
WML 99/# (Could have /T appended) which means a transfer
LN/99/# (Could have any of the following (/M-modification, /V#-variation, /T-transfer, /C-closure) appended in any combination.
In V#, # means any positive integer.
Rationale:
Licences have file reference beginning WML and a licence number beginning LN. Additional characters may be appended (/M-modification, /V#-variation, /T-transfer, /C-closure) eg WML 07/61 LN/13/02/M/V2, WML 19/36/T LN/10/35/T/M. Format of licence number when granted following appeal to PAC can vary, eg WML 04/38 PAC/2014/WCL001
Further explanation below:
- P9999/99X - Permit with division (e.g., P1234/56A)
- P9999/99X/V# - Permit with version number (e.g., P1234/56A/V1)
- WPPC 99/99 - Waste Prevention and Control (e.g., WPPC 12/34)
- WPPC 99/99/V# - WPPC with version number (e.g., WPPC 12/34/V2)
- WML 99/# - File reference (e.g., C)
- WML 99/#/T - File reference with transfer (e.g., WML 19/36/T)
- LN/99/# - Licence number (e.g., LN/13/02)
- LN/99/# with suffixes - Licence with M, V#, T, C, or N in any combination (e.g., LN/13/02/M/V2)
- PAC/9999/WCL999 - Planning Appeals Commission format (e.g., PAC/2014/WCL001)
- WML 99/# LN/99/# - Combined file reference and licence (e.g., WML 07/61 LN/13/02/M/V2)
- WML 99/# PAC/9999/WCL999 - Combined file reference and PAC (e.g., WML 04/38 PAC/2014/WCL001)
Business Rules:
- Only one authorisation number is required per site
- Must match a valid UK format pattern (case-insensitive)
- All UK nation formats are accepted (no nation-specific validation)
- Invalid formats will be rejected with error: "Site authorisation number must be in a valid UK format"
example: EPR/DD2522BF
regulatoryPositionStatements:
type: array
items:
type: integer
minimum: 1
description: |
An array of regulatory position statement (RPS) numbers. A regulatory position statement is issued when the Regulator (EA, SEPA, NIEA, NRW), doesn't require you to have a permit to carry out certain activities that they regulate. The statement will explain which activities you do not require a permit for. Each must be a positive integer.
Business Rule:
Must be positive integers (greater than 0).
example:
- 343
- 456
- 789
receipt:
type: object
required:
- address
properties:
address:
$ref: "#/components/schemas/receiptAddress"
disposalOrRecoveryCode:
type: object
required:
- code
- weight
properties:
code:
type: string
description: |
Disposal and Recovery Codes play a crucial role in categorising the methods by which waste is managed, whether through recovery or disposal processes. These codes (Recovery (R) and Disposal (D)) serve as a standardised system to ensure proper handling and treatment of waste materials. Specifically, they aid in classifying whether waste is to be recovered for further use or disposed of in a safe and environmentally responsible manner.
Notes:
- The field is case-sensitive, please use the case specified for the code returned by the GET method.
- A complete list of Disposal and Recovery Codes can be obtained using the GET Disposal and Recovery Codes method.
Business Rule:
If disposalOrRecoveryCode.code entered, then it should be in the disposalOrRecoveryCode.code listed in EUR-Lex.
example: R1
weight:
$ref: "#/components/schemas/weight"
weight:
type: object
required:
- metric
- amount
- isEstimate
properties:
metric:
type: string
enum: [Grams, Kilograms, Tonnes]
description: Unit of measurement in which the waste is being accepted.
Business Rule:
Must be “Grams”, “Kilograms” or “Tonnes”
example: Tonnes
amount:
type: number
minimum: 0
exclusiveMinimum: true
description: Total weight of the waste in a unit specified - Grams - Kilograms - Tonnes
Business Rule:
Must be a positive number (greater than 0). Note- Weight in terms of the Waste Item is the total weight of the waste being received.
Weight in terms of the DisposalRecoveryCode is the total weight of the waste being disposed of or recovered for final treatment.
example: 150
isEstimate:
type: boolean
description: Specifies whether the weight of waste is estimated. This a boolean value, i.e. true for estimated or false for not estimated.
example: true
validationResult:
type: object
properties:
key:
type: string
example: wasteItems[0].disposalOrRecoveryCodes
errorType:
type: string
description: |
can be one of the following type:
- NotProvided: A required field was not provided
- NotAllowed: The value provided is not allowed
- InvalidType: The value provided is of the wrong type
- InvalidFormat: The value provided is not in the correct format
- InvalidValue: The value provided is not valid based on the business rules
- OutOfRange: The value provided is outside the allowed range
- BusinessRuleViolation: The value provided violates a specific business rule.
example: NotProvided
message:
type: string
example: Success/Failure
description: Waste description is/is not successfully stored.
address:
type: object
required:
- postcode
properties:
fullAddress:
type: string
description: The business location address of the carrier or broker/dealer.
example: 26a Oil Drum Lane, London, UK
postcode:
type: string
description: A valid postcode must be included. Note-
Carriers, Brokers/Dealers accept UK and Irish post codes.
example: W12 7ZL
receiptAddress:
type: object
required:
- fullAddress
- postcode
properties:
fullAddress:
type: string
description: This is the address the waste is received at.
example: 26a Oil Drum Lane, London, UK
postcode:
type: string
description: A valid postcode must be included. Note-
Carriers, Brokers/Dealers accept UK and Irish post codes. Receivers accept only UK post codes.
Business Rule:
Must be in specified receiptAddress.postcode format.
example: W12 7ZL
responses:
"400":
description: Input was not in the correct format.
content:
application/json:
schema:
type: object
example:
{
"validation": {
"errors": [
{
"key": "waste.0.ewcCodes",
"errorType": "NotProvided",
"message": "\"waste[0].ewcCodes\" is required"
},
{
"key": "waste.0.wasteDescription",
"errorType": "NotProvided",
"message": "\"waste[0].wasteDescription\" is required"
},
{
"key": "receiver.authorisationNumber",
"errorType": "Required",
"message": "Site authorisation number is required"
},
{
"key": "receiver.authorisationNumber",
"errorType": "InvalidFormat",
"message": "Site authorisation number must be in a valid UK format"
},
]
}
}
properties:
validation:
type: object
properties:
errors:
type: array
items:
$ref: "#/components/schemas/validationResult"
"402":
description: Service charge payment is required. The request cannot be processed because the organisation has not paid the charge for the service.
content:
application/json:
schema:
type: object
required:
- statusCode
- error
- message
example:
{
"statusCode": 402,
"error": "Payment Required",
"message": "Payment Required",
}
properties:
statusCode:
type: number
description: The HTTP response status code.
example: 402
error:
type: string
description: The HTTP error reason.
example: Payment Required
message:
type: string
description: details of why the request was rejected.
example: Payment for the service is required before the organisation can submit or update waste receipt records.