API Docs : On-Site Capture Table

How To Read From On-Site Capture

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/on-site-capture?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/on-site-capture?venue=Example"&"key=recKgh89gvV7wBxpH
				
			
How To Write To On-Site Capture

You can use any of the columns listed below when communicating with our database:

What is the status of material? Select from 'Wet', 'Dry', 'Contaminated' and 'Unknown'. 'Wet' will incur a 12% contamination rate, 'Dry' will incur a 3% rate, and 'Contaminated' will enable you to use the manual contamination rate column.
If you use smart infrastructure, we will assign you with a record ID which you can use when adding data to link data entries to the infrastructure.
What type of collection is being made? The options are - Manual Weight, Single Use Deposit Figures, Reusable Deposit Figures

Javascript Post Request Example

				
					const axios = require('axios');

const data = JSON.stringify([
  {
    "fields": {
      "Date": "2022-07-15",
      "Venue/Location": [
        "recMsAQ8jiHRqjMAc"
      ],
      "Material Stream": [
        "reciJH2haWpTzxDQz"
      ],
      "Weight Captured": 0.3,
      "Material Status": "Wet",
      "Manual Contamination Level": 0.06,
      "Type": [
        "Manual Weight"
      ],
      "Quantity Used At Time Of Capture": 0
    }
  },
  {
    "fields": {
      "Date": "2022-07-15",
      "Venue/Location": [
        "recMsAQ8jiHRqjMAc"
      ],
      "Material Stream": [
        "reciJH2haWpTzxDQz"
      ],
      "Weight Captured": 0.5,
      "Material Status": "Wet",
      "Type": [
        "Manual Weight"
      ],
      "Quantity Used At Time Of Capture": 0
    }
  }
]);
const options = {
	headers: {"content-type": "application/json"}
}

axios.post(' https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/on-site-capture?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' ]