Classify Waste
curl --request POST \
--url https://api.example.com/v1/classify-waste \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"description": "<string>",
"source_industry": "<string>",
"additional_context": "<string>",
"max_results": 123
}
'import requests
url = "https://api.example.com/v1/classify-waste"
payload = {
"description": "<string>",
"source_industry": "<string>",
"additional_context": "<string>",
"max_results": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
description: '<string>',
source_industry: '<string>',
additional_context: '<string>',
max_results: 123
})
};
fetch('https://api.example.com/v1/classify-waste', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/classify-waste",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'source_industry' => '<string>',
'additional_context' => '<string>',
'max_results' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/classify-waste"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/classify-waste")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/classify-waste")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}"
response = http.request(request)
puts response.read_body{
"classifications": [
{}
],
"classifications[].ewc_code": "<string>",
"classifications[].confidence": 123,
"classifications[].reasoning": "<string>",
"classifications[].is_hazardous": true,
"compliance.hazardous_waste": true,
"compliance.requires_consignment_note": true,
"compliance.disposal_notes": "<string>"
}API Reference
Classify Waste
Classify a waste description into EWC codes using AI
POST
/
v1
/
classify-waste
Classify Waste
curl --request POST \
--url https://api.example.com/v1/classify-waste \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"description": "<string>",
"source_industry": "<string>",
"additional_context": "<string>",
"max_results": 123
}
'import requests
url = "https://api.example.com/v1/classify-waste"
payload = {
"description": "<string>",
"source_industry": "<string>",
"additional_context": "<string>",
"max_results": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
description: '<string>',
source_industry: '<string>',
additional_context: '<string>',
max_results: 123
})
};
fetch('https://api.example.com/v1/classify-waste', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/classify-waste",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'source_industry' => '<string>',
'additional_context' => '<string>',
'max_results' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/classify-waste"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/classify-waste")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/classify-waste")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"description\": \"<string>\",\n \"source_industry\": \"<string>\",\n \"additional_context\": \"<string>\",\n \"max_results\": 123\n}"
response = http.request(request)
puts response.read_body{
"classifications": [
{}
],
"classifications[].ewc_code": "<string>",
"classifications[].confidence": 123,
"classifications[].reasoning": "<string>",
"classifications[].is_hazardous": true,
"compliance.hazardous_waste": true,
"compliance.requires_consignment_note": true,
"compliance.disposal_notes": "<string>"
}Classify Waste
Classifies a plain-English waste description into the correct European Waste Catalogue (EWC) code(s) using AI. The EWC comprises approximately 650 six-digit codes across 20 chapters. Codes marked with an asterisk are hazardous.Requires authentication via
Authorization header. See Authentication.Request
Method:POST
Path: /v1/classify-waste
Headers
Body Parameters
Response
Success Response (200)
{
"classifications": [
{
"ewc_code": "17 08 02",
"description": "Gypsum-based construction materials",
"chapter": "17 - Construction and demolition wastes",
"is_hazardous": false,
"confidence": 0.94,
"reasoning": "Plasterboard is gypsum-based. Non-contaminated material from construction falls under chapter 17."
}
],
"compliance": {
"hazardous_waste": false,
"flags": [],
"disposal_notes": "Standard non-hazardous waste. Suitable for licensed waste transfer station or recycling.",
"requires_consignment_note": false
},
"metadata": {
"classified_at": "2026-03-25T14:31:00Z",
"model_version": "1.0",
"cached": false
}
}
Confidence Scores
| Score | Interpretation | Recommended Action |
|---|---|---|
| 0.9 - 1.0 | High confidence | Safe to use directly |
| 0.7 - 0.89 | Moderate confidence | Acceptable, but review if waste is unusual |
| Below 0.7 | Low confidence | Manual review recommended. A LOW_CONFIDENCE flag is returned |
Caching
Classifications are cached for 7 days based on the exact combination ofdescription and source_industry. EWC codes don’t change, so cached results remain accurate. The metadata.cached field indicates cache status.
Error Responses
| Code | HTTP | When |
|---|---|---|
INVALID_REQUEST | 400 | Missing description field |
CLASSIFICATION_FAILED | 500 | Waste classification could not be completed |
Example
curl -X POST https://api.wastecheck.co.uk/v1/classify-waste \
-H "Authorization: Bearer wc_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"description": "Broken plasterboard from office refurbishment",
"source_industry": "construction",
"additional_context": "Non-contaminated, from internal walls"
}'
const response = await fetch(
"https://api.wastecheck.co.uk/v1/classify-waste",
{
method: "POST",
headers: {
"Authorization": "Bearer wc_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Broken plasterboard from office refurbishment",
source_industry: "construction",
additional_context: "Non-contaminated, from internal walls",
}),
}
);
const data = await response.json();
console.log(data.classifications[0].ewc_code); // "17 08 02"
import requests
response = requests.post(
"https://api.wastecheck.co.uk/v1/classify-waste",
headers={
"Authorization": "Bearer wc_live_your_api_key_here",
},
json={
"description": "Broken plasterboard from office refurbishment",
"source_industry": "construction",
"additional_context": "Non-contaminated, from internal walls",
},
)
data = response.json()
print(data["classifications"][0]["ewc_code"]) # "17 08 02"