Products (Customers) [API]

Authentication

The username is the customer's email and the password is the customer's API token. Customers can find their API token in the 'Contact Details' tab of the 'My Account' section in their webstore. Admins can find the customer's API token in Customers/Customer/Customer Details. 

Note that admins must "Enable ordering with API" for the customer in Customers/Customer/Customer Details. If it is not enabled, customers will receive a 401 error when requesting data and they won't be able to access their API token on the webstore.


List Products with details

Additional formats supported for listing orders: XML and CSV

To access product details in these formats, change the URL to <your URL here>/api_customer/products.xml OR <your URL here>/api_customer/products.csv)

Description List products with details
Action GET
URL <your URL here>/api_customer/products
Sample request parameters
{"code_eq":bgb}
		
Available parameters By default, all products will be fetched if you do not include any parameters. If you need filtered results, the following parameters are supported:

Product ID: id_eq=<your product ID here>
Multiple Product IDs: id_in[]=<your first product ID here>&id_in[]=<your second product ID here>
Product Code: code_eq=<your product code here>  
Sample JSON Response
{
  "data": [
    {
      "id": 1,
      "name": "Blue gift box",
      "code": "bgb",
      "category_path": "Sample Category 2",
      "quantity": "701.0",
      "price": "9.5",
      "created_at": "2019-05-26T21:49:49.000-04:00",
      "updated_at": "2019-09-12T13:49:52.000-04:00"
    },
  ],
  "pagination": {
    "offset": 0,
    "limit": 500,
    "total": 2
  }
}
		


Field descriptions for Orders

Name Type Description
id integer
Product id
name string Name of product
code string Product code
category_path string
Category Path
quantity integer Quantity of product currently available
price
integer
Comments for order by customer
created_at
datetime
Date and time that the product was created
updated_at
datetime
Date and time that the product was updated
offset
integer
Position where requests begin
limit
integer
Maximum number of products returned in a request

Field descriptions for Pagination

offset integer Position where requests begin (eg offset = 0 when requests start from the first product)
limit integer Maximum number of products returned in a request
total integer Number of products returned in this request

Still need help? Contact Us Contact Us