{"openapi":"3.1.0","info":{"title":"QWTN API","version":"2026-10-01","description":"REST API for QWTN waste transfer notes, operations and billing data. Authenticate with a team API key created in Settings → API access. All list endpoints use cursor pagination; all errors share one envelope.","contact":{"name":"QWTN support","email":"support@qwtn.co.uk","url":"https://qwtn.co.uk/developers"}},"servers":[{"url":"https://qwtn.co.uk"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Waste transfer notes"},{"name":"Clients"},{"name":"Sites"},{"name":"Collections"},{"name":"Containers"},{"name":"Invoices"},{"name":"Quotes"},{"name":"Hazardous waste consignment notes"},{"name":"Weighbridge tickets"}],"paths":{"/api/v1/notes":{"get":{"operationId":"list_notes","tags":["Waste transfer notes"],"summary":"List waste transfer notes","description":"Newest first. Requires `notes:read`.","security":[{"bearerAuth":["notes:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string","enum":["draft","scheduled","pending_signature","pending_party","complete","valid","cancelled"]}},{"name":"client_id","in":"query","required":false,"description":"Only notes for this client","schema":{"type":"string","format":"uuid"}},{"name":"updated_after","in":"query","required":false,"description":"Only notes updated at or after this timestamp (incremental sync)","schema":{"type":"string","format":"date-time"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_note","tags":["Waste transfer notes"],"summary":"Create a draft transfer note","security":[{"bearerAuth":["notes:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Recommended. Retrying with the same key within 24h returns the original response (header `Idempotent-Replayed: true`) instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"waste_description":{"type":"string","description":"Section A1: description of the waste","maxLength":1000},"ewc_codes":{"type":"array","items":{"type":"string"},"description":"Section A1: one or more 6-digit EWC codes, e.g. \"20 03 01\""},"quantity":{"type":"string","description":"Section A3: quantity (free text, e.g. \"2 x 8yd skips\")","maxLength":200},"weight_kg":{"type":"number","description":"Section A3: weight in kilograms"},"quantity_value":{"type":"number","description":"Quantity as entered, in `quantity_unit` (Duty of Care: weight, volume or number of containers)"},"quantity_unit":{"type":"string","description":"One of kg, tonnes, m3, litres, yd3, containers","maxLength":12},"container_type":{"type":"string","description":"Container type and size, e.g. \"1100L bin\", \"8 yd skip\" (needed to estimate weight for `containers`)","maxLength":80},"weight_is_estimate":{"type":"boolean","description":"True when the kg weight is estimated rather than weighed (default true). Omitted weight is estimated from typical bulk densities."},"client_id":{"type":"string","format":"uuid","description":"Client (transferor) — prefills section B from the client record"},"client_location_id":{"type":"string","format":"uuid","description":"Client site the waste is collected from"},"collection_id":{"type":"string","format":"uuid","description":"Collection this note covers"},"transferor_name":{"type":"string","description":"Section B1 name (overrides the client record)","maxLength":200},"transferor_company":{"type":"string","description":"Section B1 company","maxLength":200},"transferor_postcode":{"type":"string","description":"Section B1 postcode","maxLength":12},"transfer_date":{"type":"string","format":"date","description":"Section D1 date of transfer"},"transfer_address":{"type":"string","description":"Section D1 address of transfer","maxLength":500}},"required":["waste_description","ewc_codes"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Same Idempotency-Key still in flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed or Idempotency-Key reused with a different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notes/{id}":{"get":{"operationId":"get_note","tags":["Waste transfer notes"],"summary":"Get a note","security":[{"bearerAuth":["notes:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/clients":{"get":{"operationId":"list_clients","tags":["Clients"],"summary":"List clients","description":"Newest first. Requires `clients:read`.","security":[{"bearerAuth":["clients:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"email","in":"query","required":false,"description":"Exact email match","schema":{"type":"string"}},{"name":"postcode","in":"query","required":false,"description":"Exact postcode match","schema":{"type":"string"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_client","tags":["Clients"],"summary":"Create a client","security":[{"bearerAuth":["clients:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Recommended. Retrying with the same key within 24h returns the original response (header `Idempotent-Replayed: true`) instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"Display name (person or business)","maxLength":200},"company":{"type":"string","description":"Registered company name","maxLength":200},"email":{"type":"string","description":"Billing / contact email","maxLength":254},"phone":{"type":"string","description":"Phone number","maxLength":40},"address":{"type":"string","description":"Address line(s)","maxLength":500},"city":{"type":"string","description":"Town or city","maxLength":100},"postcode":{"type":"string","description":"UK postcode","maxLength":12},"company_number":{"type":"string","description":"Companies House number","maxLength":20},"sic_code":{"type":"string","description":"SIC code (used on transfer notes)","maxLength":10},"notes":{"type":"string","description":"Internal notes","maxLength":2000}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Same Idempotency-Key still in flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed or Idempotency-Key reused with a different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/clients/{id}":{"get":{"operationId":"get_client","tags":["Clients"],"summary":"Get a client","security":[{"bearerAuth":["clients:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_client","tags":["Clients"],"summary":"Update a client (partial)","security":[{"bearerAuth":["clients:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Recommended. Retrying with the same key within 24h returns the original response (header `Idempotent-Replayed: true`) instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"Display name (person or business)","maxLength":200},"company":{"type":"string","description":"Registered company name","maxLength":200},"email":{"type":"string","description":"Billing / contact email","maxLength":254},"phone":{"type":"string","description":"Phone number","maxLength":40},"address":{"type":"string","description":"Address line(s)","maxLength":500},"city":{"type":"string","description":"Town or city","maxLength":100},"postcode":{"type":"string","description":"UK postcode","maxLength":12},"company_number":{"type":"string","description":"Companies House number","maxLength":20},"sic_code":{"type":"string","description":"SIC code (used on transfer notes)","maxLength":10},"notes":{"type":"string","description":"Internal notes","maxLength":2000}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sites":{"get":{"operationId":"list_sites","tags":["Sites"],"summary":"List sites","description":"Newest first. Requires `sites:read`.","security":[{"bearerAuth":["sites:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"site_type","in":"query","required":false,"description":"Filter by site type","schema":{"type":"string"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sites/{id}":{"get":{"operationId":"get_site","tags":["Sites"],"summary":"Get a site","security":[{"bearerAuth":["sites:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/collections":{"get":{"operationId":"list_collections","tags":["Collections"],"summary":"List collections","description":"Newest first. Requires `collections:read`.","security":[{"bearerAuth":["collections:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]}},{"name":"client_id","in":"query","required":false,"description":"Only collections for this client","schema":{"type":"string","format":"uuid"}},{"name":"scheduled_from","in":"query","required":false,"description":"Scheduled on or after (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"scheduled_to","in":"query","required":false,"description":"Scheduled before (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_collection","tags":["Collections"],"summary":"Schedule a collection","security":[{"bearerAuth":["collections:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Recommended. Retrying with the same key within 24h returns the original response (header `Idempotent-Replayed: true`) instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"scheduled_date":{"type":"string","format":"date","description":"Date of the collection"},"scheduled_time":{"type":"string","description":"Time (HH:MM, 24h)","maxLength":5},"client_id":{"type":"string","format":"uuid","description":"Client being collected from"},"client_location_id":{"type":"string","format":"uuid","description":"Client site"},"address":{"type":"string","description":"Collection address (defaults to the client site)","maxLength":500},"postcode":{"type":"string","description":"Collection postcode","maxLength":12},"waste_description":{"type":"string","description":"What is being collected","maxLength":1000},"ewc_codes":{"type":"array","items":{"type":"string"},"description":"EWC codes"},"quantity_kg":{"type":"number","description":"Weight (kg)"},"quantity_value":{"type":"number","description":"Quantity as entered, in `quantity_unit` (Duty of Care: weight, volume or number of containers)"},"quantity_unit":{"type":"string","description":"One of kg, tonnes, m3, litres, yd3, containers","maxLength":12},"container_type":{"type":"string","description":"Container type and size, e.g. \"1100L bin\", \"8 yd skip\" (needed to estimate weight for `containers`)","maxLength":80},"weight_is_estimate":{"type":"boolean","description":"True when the kg weight is estimated rather than weighed (default true). Omitted weight is estimated from typical bulk densities."},"container_id":{"type":"string","format":"uuid","description":"Container being serviced"},"driver_notes":{"type":"string","description":"Notes for the driver","maxLength":2000}},"required":["scheduled_date"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Same Idempotency-Key still in flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed or Idempotency-Key reused with a different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/collections/{id}":{"get":{"operationId":"get_collection","tags":["Collections"],"summary":"Get a collection","security":[{"bearerAuth":["collections:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/containers":{"get":{"operationId":"list_containers","tags":["Containers"],"summary":"List containers","description":"Newest first. Requires `containers:read`.","security":[{"bearerAuth":["containers:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string"}},{"name":"client_id","in":"query","required":false,"description":"Only containers at this client","schema":{"type":"string","format":"uuid"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContainerList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/containers/{id}":{"get":{"operationId":"get_container","tags":["Containers"],"summary":"Get a container","security":[{"bearerAuth":["containers:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Container"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/invoices":{"get":{"operationId":"list_invoices","tags":["Invoices"],"summary":"List invoices","description":"Newest first. Requires `invoices:read`.","security":[{"bearerAuth":["invoices:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string","enum":["draft","sent","overdue","paid","credited","void"]}},{"name":"client_id","in":"query","required":false,"description":"Only invoices for this client","schema":{"type":"string","format":"uuid"}},{"name":"issued_from","in":"query","required":false,"description":"Issued on or after (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/invoices/{id}":{"get":{"operationId":"get_invoice","tags":["Invoices"],"summary":"Get a invoice","security":[{"bearerAuth":["invoices:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/quotes":{"get":{"operationId":"list_quotes","tags":["Quotes"],"summary":"List quotes","description":"Newest first. Requires `quotes:read`.","security":[{"bearerAuth":["quotes:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string","enum":["draft","sent","accepted","declined","expired"]}},{"name":"client_id","in":"query","required":false,"description":"Only quotes for this client","schema":{"type":"string","format":"uuid"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/quotes/{id}":{"get":{"operationId":"get_quote","tags":["Quotes"],"summary":"Get a quote","security":[{"bearerAuth":["quotes:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consignment-notes":{"get":{"operationId":"list_consignment_notes","tags":["Hazardous waste consignment notes"],"summary":"List hazardous waste consignment notes","description":"Newest first. Requires `consignments:read`.","security":[{"bearerAuth":["consignments:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","required":false,"description":"Filter by status","schema":{"type":"string","enum":["draft","issued","collected","received","rejected","cancelled"]}},{"name":"client_id","in":"query","required":false,"description":"Only consignments for this client","schema":{"type":"string","format":"uuid"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsignmentNoteList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/consignment-notes/{id}":{"get":{"operationId":"get_consignment_note","tags":["Hazardous waste consignment notes"],"summary":"Get a consignment note","security":[{"bearerAuth":["consignments:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsignmentNote"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/weighbridge-tickets":{"get":{"operationId":"list_weighbridge_tickets","tags":["Weighbridge tickets"],"summary":"List weighbridge tickets","description":"Newest first. Requires `weighbridge:read`.","security":[{"bearerAuth":["weighbridge:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"ticket_from","in":"query","required":false,"description":"Ticket date on or after (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"vehicle_reg","in":"query","required":false,"description":"Exact vehicle registration","schema":{"type":"string"}},{"name":"created_after","in":"query","required":false,"description":"Only items created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"description":"Only items created before this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeighbridgeTicketList"}}}},"400":{"description":"Invalid cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_weighbridge_ticket","tags":["Weighbridge tickets"],"summary":"Record a weighbridge ticket","security":[{"bearerAuth":["weighbridge:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Recommended. Retrying with the same key within 24h returns the original response (header `Idempotent-Replayed: true`) instead of creating a duplicate."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ticket_number":{"type":"string","description":"Weighbridge ticket number","maxLength":60},"ticket_date":{"type":"string","format":"date","description":"Defaults to today"},"vehicle_reg":{"type":"string","description":"Vehicle registration","maxLength":12},"waste_type":{"type":"string","description":"Waste description","maxLength":200},"ewc_code":{"type":"string","description":"EWC code","maxLength":10},"gross_kg":{"type":"number","description":"Gross (loaded) weight, kg"},"tare_kg":{"type":"number","description":"Tare (empty) weight, kg"},"site_id":{"type":"string","format":"uuid","description":"Site the ticket was issued at"},"note_id":{"type":"string","format":"uuid","description":"Transfer note this load relates to"},"notes":{"type":"string","description":"Notes","maxLength":2000}},"required":["vehicle_reg","waste_type","gross_kg","tare_kg"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeighbridgeTicket"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Same Idempotency-Key still in flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed or Idempotency-Key reused with a different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/weighbridge-tickets/{id}":{"get":{"operationId":"get_weighbridge_ticket","tags":["Weighbridge tickets"],"summary":"Get a weighbridge ticket","security":[{"bearerAuth":["weighbridge:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeighbridgeTicket"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notes/{id}/pdf":{"get":{"operationId":"get_note_pdf","tags":["Waste transfer notes"],"summary":"Download a transfer note as PDF","description":"Rendered with your WTN branding. Drafts carry a DRAFT watermark.","security":[{"bearerAuth":["notes:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/me":{"get":{"operationId":"get_me","tags":["Account"],"summary":"Inspect the current API key","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Key info","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"api_key"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}}}}}}},"401":{"description":"Missing, malformed, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"note.signed":{"post":{"summary":"Note signed","description":"A transferor or transferee signature was captured on a waste transfer note.\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"note.signed"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The note as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"note.completed":{"post":{"summary":"Note completed","description":"A transfer note became complete (or a season ticket became valid).\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"note.completed"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The note as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"collection.completed":{"post":{"summary":"Collection completed","description":"A driver or office user marked a collection completed.\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"collection.completed"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The collection as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"invoice.sent":{"post":{"summary":"Invoice sent","description":"An invoice was sent to the customer for the first time.\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"invoice.sent"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The invoice as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"invoice.paid":{"post":{"summary":"Invoice paid","description":"An invoice was marked paid (manually or by payment link).\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"invoice.paid"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The invoice as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"quote.accepted":{"post":{"summary":"Quote accepted","description":"A customer accepted a quote.\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"quote.accepted"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The quote as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"consignment.issued":{"post":{"summary":"Consignment issued","description":"A hazardous waste consignment note was issued.\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"consignment.issued"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The consignment_note as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}},"compliance.expiring":{"post":{"summary":"Compliance expiring","description":"A vehicle MOT/tax/insurance, site permit or driver licence/CPC is within 30 days of expiry (sent at 30, 7 and 0 days).\n\nSigned with `QWTN-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>`.","parameters":[{"name":"QWTN-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"QWTN-Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","object","type","created_at","data"],"properties":{"id":{"type":"string","description":"evt_… — dedupe on this"},"object":{"const":"event"},"type":{"const":"compliance.expiring"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"team_id":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"object":{"description":"The compliance_item as returned by the REST API at the time of the event"}}}}}}}},"responses":{"200":{"description":"Return any 2xx within 10s to acknowledge. Non-2xx or timeouts are retried with backoff for ~3 days; 410 disables the endpoint."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"qwtn_live_<id>_<secret>","description":"Scopes: `notes:read` (Read waste transfer notes and PDFs), `notes:write` (Create draft transfer notes), `clients:read` (Read clients), `clients:write` (Create and update clients), `sites:read` (Read sites), `collections:read` (Read collections), `collections:write` (Create collections), `containers:read` (Read containers), `invoices:read` (Read invoices), `quotes:read` (Read quotes), `consignments:read` (Read hazardous consignment notes), `weighbridge:read` (Read weighbridge tickets), `weighbridge:write` (Create weighbridge tickets), or `*` for full access."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","rate_limit_error","idempotency_error","api_error"]},"code":{"type":"string","enum":["unauthenticated","invalid_api_key","forbidden","insufficient_scope","not_found","validation_failed","invalid_cursor","rate_limited","idempotency_conflict","idempotency_in_progress","method_not_allowed","internal_error"]},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"description":"For validation_failed: array of { field, message }"}}}}},"Note":{"type":"object","description":"Waste transfer notes","properties":{"object":{"const":"note"},"id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"status":{"type":"string"},"note_type":{"type":"string"},"waste":{"type":"object"},"transferor":{"type":"object"},"transferee":{"type":"object"},"transfer":{"type":"object"},"signatures":{"type":"object"},"client_id":{"type":["string","null"],"format":"uuid"},"pdf_url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"NoteList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Client":{"type":"object","description":"Clients","properties":{"object":{"const":"client"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"company":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":"object"},"company_number":{"type":["string","null"]},"carrier_registration":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"ClientList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Site":{"type":"object","description":"Sites","properties":{"object":{"const":"site"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"site_type":{"type":["string","null"]},"address":{"type":["string","null"]},"postcode":{"type":["string","null"]},"contact":{"type":"object"},"permit":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"SiteList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Collection":{"type":"object","description":"Collections","properties":{"object":{"const":"collection"},"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"scheduled_date":{"type":"string","format":"date"},"address":{"type":["string","null"]},"postcode":{"type":["string","null"]},"ewc_codes":{"type":"array","items":{"type":"string"}},"quantity_kg":{"type":["number","null"]},"quantity_value":{"type":["number","null"]},"quantity_unit":{"type":["string","null"]},"container_type":{"type":["string","null"]},"weight_is_estimate":{"type":"boolean"},"client_id":{"type":["string","null"],"format":"uuid"},"note_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"CollectionList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Container":{"type":"object","description":"Containers","properties":{"object":{"const":"container"},"id":{"type":"string","format":"uuid"},"reference":{"type":["string","null"]},"container_type":{"type":"string"},"status":{"type":"string"},"location":{"type":"object"},"client_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"ContainerList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Container"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Invoice":{"type":"object","description":"Invoices","properties":{"object":{"const":"invoice"},"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"issue_date":{"type":"string","format":"date"},"due_date":{"type":["string","null"],"format":"date"},"subtotal":{"type":"number"},"vat_amount":{"type":"number"},"total":{"type":"number"},"lines":{"type":"array","items":{"type":"object"}},"client_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"InvoiceList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"Quote":{"type":"object","description":"Quotes","properties":{"object":{"const":"quote"},"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"status":{"type":"string"},"total":{"type":"number"},"lines":{"type":"array","items":{"type":"object"}},"accepted_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"QuoteList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"ConsignmentNote":{"type":"object","description":"Hazardous waste consignment notes","properties":{"object":{"const":"consignment_note"},"id":{"type":"string","format":"uuid"},"consignment_code":{"type":["string","null"]},"jurisdiction":{"type":"string"},"status":{"type":"string"},"parts":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"ConsignmentNoteList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentNote"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}},"WeighbridgeTicket":{"type":"object","description":"Weighbridge tickets","properties":{"object":{"const":"weighbridge_ticket"},"id":{"type":"string","format":"uuid"},"ticket_number":{"type":["string","null"]},"ticket_date":{"type":"string","format":"date"},"vehicle_reg":{"type":["string","null"]},"gross_kg":{"type":["number","null"]},"tare_kg":{"type":["number","null"]},"net_kg":{"type":["number","null"]},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"WeighbridgeTicketList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WeighbridgeTicket"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page"}}}}}}