The facility which is making the product
Menu
API Docs : Manufacture Table
- August 26, 2022
- 10:51 am
How To Read From Manufacture
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/manufacture?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/manufacture?venue=Example"&"key=recKgh89gvV7wBxpH
How To Write To Manufacture
You can use any of the columns listed below when communicating with our database:
Name of the product or groupf of products which was manufactured using this material batch
How many of the products were produced?
The supply ID of the material used to manufacture these products
Javascript Post Request Example
const axios = require('axios');
const data = JSON.stringify([
{
"fields": {
"Date": "2022-02-28",
"Product Name": [
"recmxbikyBTAbFTW4"
],
"Quantity Produced": 1500000,
"Supply IDs": [
"rectz6y83pSIE4hjQ"
],
"Manufacture Facility": [
"reczWh0nPjXLnEzq8"
]
}
},
{
"fields": {
"Date": "2022-02-28",
"Product Name": [
"recmxbikyBTAbFTW4"
],
"Quantity Produced": 1500000,
"Supply IDs": [
"rectz6y83pSIE4hjQ"
],
"Manufacture Facility": [
"reczWh0nPjXLnEzq8"
]
}
}
]);
const options = {
headers: {"content-type": "application/json"}
}
axios.post(' https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/manufacture?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' ]