API Docs : Venue Products Table

How To Read From Venue Products

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/venue-products?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/venue-products?venue=Example"&"key=recKgh89gvV7wBxpH
				
			
How To Write To Venue Products

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

What is the brand of the product? If you cannot find your brand you can add a new one via the portal. Choices are either "Coca Cola", "Evian", "Lipton", ", "Perrier", "Volvic Mineral", "Volvic Fruit", "Buxton", "Sprite", "Tango", "Smart Water", "Unbranded", "Bud", "Hertog Jan", "Jupiler", "Other", "RedBull", "Lipton Tea", "Thatchers", "Red Bull", "San Pellegrino", "San[...]

Javascript Post Request Example

				
					const axios = require('axios');

const data = JSON.stringify([
  {
    "fields": {
      "Product Name": [
        "recIjR1oUG94D8Avf"
      ],
      "Venue/Location": [
        "rec6WP5bsnjLm5i18"
      ],
      "Stream Parent": [
        "recxIURdHSYjlno99"
      ],
      "Version Number": 1,
      "Brand": "Coca Cola",
      "1 -On-Site Delivery Logbook": [
        "recFemRsZo8lKekhY"
      ]
    }
  },
  {
    "fields": {
      "Product Name": [
        "recSVwVlQkr9N9Y1W"
      ],
      "Venue/Location": [
        "rec6WP5bsnjLm5i18"
      ],
      "Stream Parent": [
        "recxIURdHSYjlno99"
      ],
      "Brand": "Jupiler",
      "1 -On-Site Delivery Logbook": [
        "recS36scjyjyI7SlG"
      ]
    }
  }
]);
const options = {
	headers: {"content-type": "application/json"}
}

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