API > Request Formats

Request Formats

This is currently a low REST API: as a general rule, use GET to retrieve data and POST to update or insert.

  • Using GET: all parameters are encoded in the URI string.
  • Using POST: all parameters are read using POST variables, including your API key.

Typical requests:

  • GET request to https://.vendo.co.nz/api/products?api_key={YOUR_API_KEY} – List all products
  • GET request to https://.vendo.co.nz/api/product/1?api_key={YOUR_API_KEY} – List all product data with product_id of 1
  • GET request to https://.vendo.co.nz/api/product?api_key={YOUR_API_KEY}&product_id=1&fields=price,name – List only price and name for product with product_id of 1
  • POST request to https://.vendo.co.nzapi/product with no product_id – Create a new product
  • POST request to https://.vendo.co.nz/api/product/1 – Update product with product_id of 1