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://35.175.200.4/api/products?api_key=YOUR_API_KEY – List all products
  • GET request to https://35.175.200.4/api/product/1?api_key=YOUR_API_KEY – List all product data with product_id of 1
  • GET request to https://35.175.200.4/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
  • GET request to https://35.175.200.4/api/orders?api_key=YOUR_API_KEY&limit=25 – List the most recent 25 orders
  • POST request to https://35.175.200.4api/product with no product_id – Create a new product
  • POST request to https://35.175.200.4/api/product/1 – Update product with product_id of 1