If it can be linked to a collection Record ID, it should be added here.
Menu
API Docs : Waste Sorting Table
- August 26, 2022
- 10:51 am
How To Read From Waste Sorting
You can use any of the columns listed below when communicating with our database:
Javascript Get Request Example
const axios = require('axios');
axios
.get('https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/waste-sorting?venue=Example&key=recKGDfugvV46BxpH'
)
.then(res => {
console.log(res.data.Retrieved);
})
.catch(error => {
console.error(error);
});
Get Request ‘curl’ Example
curl https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/waste-sorting?venue=Example"&"key=recKgh89gvV7wBxpH
How To Write To Waste Sorting
You can use any of the columns listed below when communicating with our database:
The date that the material was finished sorting
This is the venues stream ID which you are sorting. If you were unable to link the collection ID, you should ensure you put the stream in here.
What material was sorted? Pick from PET, PP Paperboard, Card, LDPE, HDPE, Metal, Glass, Food, Other
If you know which venue product IDs you are separating it can be entered here (non essential)
The quantity of material which resulted after being sorted
If you do not know the collection ID, enter the start weight here to find contamination rates for this sorting run. (non essential as contamination rates are generally applied to an entire stream)
The venue whos material is being sorted.
Javascript Post Request Example
const axios = require('axios');
const data = JSON.stringify([
{
"fields": {
"Material": [
"PET"
],
"Venue/Location": [
"rec6WP5bsnjLm5i18"
],
"Quantity (tonnes)": 1.06,
"Collection ID": [
"recPbYSPAhpWXr1xZ"
],
"Material Stream": [
"recxIURdHSYjlno99"
],
"Sorted By": [
"recDw2uSBfyc03dVQ"
],
"6 - Material Processing": [
"rectz6y83pSIE4hjQ"
],
"Sorting Facility": [
"recnVCmOetcpZjwrY"
],
"Distance": 171.189
}
},
{
"fields": {
"Material": [
"PET"
],
"Venue/Location": [
"recXW58JYhzyM6Odn"
],
"Quantity (tonnes)": 0.8,
"Collection ID": [
"rec50N67JovtlXPFg"
],
"Material Stream": [
"rectLUOwQU94379ox"
],
"Sorted By": [
"recDw2uSBfyc03dVQ"
],
"6 - Material Processing": [
"rectz6y83pSIE4hjQ"
],
"Sorting Facility": [
"recnVCmOetcpZjwrY"
],
"Distance": 171.189
}
}
]);
const options = {
headers: {"content-type": "application/json"}
}
axios.post(' https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/waste-sorting?venue=Example&key=recKGDlu45gyBxpH', data, options)
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
Javascript Post Response Data Example
[ 'recgj7rzZ9SeuZdmZ', 'recpsw3rdaMeHPWJy' ]