Get started

To use this API, you need an API key. The CMS Max API uses Bearer Token Authentication.

GET /api/v1/products HTTP/1.1
Authorization: Bearer {YOUR_API_TOKEN}

Get Brand List

      

Request

GET /api/v1/brands HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": [ { "id": "", "name": "Nike", "content": "", "browser_title": "Nike", "slug": "nike", "meta_description": "", "image_id": null, "created_at": "", "updated_at": "", "show_title": 0, "show_breadcrumbs": 0, "breadcrumb_name": null, "layout": "default", "custom_sections": 0, "page_wrapper_class": null, "last_updated_by": null, "social_media_image_id": null, "show_products": 0 } ] }

Get brand list

GET /api/v1/brands

Create Brand

      

Request

POST /api/v1/brands HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "Nike", "browser_title": "Nike", "image_id": "", "social_media_image_id": "" }

Response

{ "data": { "id": "", "name": "Nike", "content": "", "browser_title": "Nike", "slug": "nike", "meta_description": "", "image_id": null, "created_at": "", "updated_at": "", "show_title": 0, "show_breadcrumbs": 0, "breadcrumb_name": null, "layout": "default", "custom_sections": 0, "page_wrapper_class": null, "last_updated_by": null, "social_media_image_id": null, "show_products": 0 } }

Create a brand.

POST /api/v1/brands


BODY PARAMETERS

Field Type Description
name string Name (required)
browser_title string Browser Title (required)
image_id numeric Image ID (optional)
social_media_image_id numeric Social Media Image ID (optional)

Update Brand

      

Request

PUT /api/v1/brands/{brand_id} HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "Nike", "browser_title": "Nike", "image_id": "", "social_media_image_id": "" }

Response

{ "data": { "id": "", "name": "Nike", "content": "", "browser_title": "Nike", "slug": "nike", "meta_description": "", "image_id": null, "created_at": "", "updated_at": "", "show_title": 0, "show_breadcrumbs": 0, "breadcrumb_name": null, "layout": "default", "custom_sections": 0, "page_wrapper_class": null, "last_updated_by": null, "social_media_image_id": null, "show_products": 0 } }

Errors

{ "errors": { "default": [ "Brand not found" ] } }

Update a brand.

PUT /api/v1/brands/{brand_id}


QUERY PARAMETERS

Field Type Description
brand_id numeric Brand ID (required)

BODY PARAMETERS

Field Type Description
name string Name (required)
browser_title string Browser Title (required)
image_id numeric Image ID (optional)
social_media_image_id numeric Social Media Image ID (optional)

Delete Brand

    

Request

DELETE /api/v1/brands/{brand_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "Brand not found" ] } }

Delete a brand.

DELETE /api/v1/brands/{brand_id}


QUERY PARAMETERS

Field Type Description
brand_id numeric Brand ID (required)

Get Product Category List

      

Request

GET /api/v1/product_categories HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": [ { "id": "", "created_at": "", "updated_at": "", "title": "", "browser_title": "", "slug": "", "visibility": "", "password": null, "meta_description": "", "content_above": "", "no_index": 0, "no_follow": 0, "show_breadcrumbs": 1, "views": 0, "layout": "default", "breadcrumb_name": "", "last_updated_by": null, "thumbnail_image": null, "social_media_image": null, "_lft": 1, "_rgt": 2, "parent_id": null, "google_shopping_category": null, "gender": null, "age_group": null, "show_sub_categories": 1, "child_category_columns": "", "custom_sections": 0, "content_below": "", "show_title": 1, "page_wrapper_class": "", "show_products": 1, "easyship_category": null } ] }

Get product category list.

GET /api/v1/product_categories

Create Product Category

      

Request

POST /api/v1/product_categories HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "title": "Nike", "layout": "default", "custom_sections": "0", "child_category_columns": "", "parent_id": "0", "content_above": "", "content_below": "", "thumbnail_image": "", "social_media_image": "" }

Response

{ "data": { "id": "", "created_at": "", "updated_at": "", "title": "", "browser_title": "", "slug": "", "visibility": "", "password": null, "meta_description": null, "content_above": "", "no_index": 0, "no_follow": 0, "show_breadcrumbs": 0, "views": 0, "layout": "default", "breadcrumb_name": null, "last_updated_by": null, "thumbnail_image": "", "social_media_image": "", "_lft": "", "_rgt": "", "parent_id": null, "google_shopping_category": null, "gender": null, "age_group": null, "show_sub_categories": 0, "child_category_columns": "", "custom_sections": 0, "content_below": "", "show_title": 0, "page_wrapper_class": null, "show_products": 0, "easyship_category": null } }

Create a product category.

POST /api/v1/product_categories


BODY PARAMETERS

Field Type Description
title string Title (required)
layout string Layout (optional)
default | full_page_width | custom
custom_sections boolean Sections (required)
0: Default
1: Custom
child_category_columns numeric Child Category Columns (required)
2: 2 Columns
3: 3 Columns
4: 4 Columns
parent_id numeric Parent Category ID (optional)
content_above string Content (Above Products) (optional)
content_below string Content (Below Products) (optional)
thumbnail_image numeric Thumbnail Image ID (optional)
social_media_image numeric Social Media Image ID (optional)

Update Product Category

      

Request

PUT /api/v1/product_categories/{category_id} HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "title": "Nike", "layout": "default", "custom_sections": "0", "child_category_columns": "", "parent_id": "0", "content_above": "", "content_below": "", "thumbnail_image": "", "social_media_image": "" }

Response

{ "data": { "id": 1, "created_at": "", "updated_at": "", "title": "", "browser_title": "", "slug": "", "visibility": "", "password": null, "meta_description": "", "content_above": "", "no_index": 0, "no_follow": 0, "show_breadcrumbs": 1, "views": 0, "layout": "default", "breadcrumb_name": "", "last_updated_by": null, "thumbnail_image": null, "social_media_image": null, "_lft": 1, "_rgt": 2, "parent_id": null, "google_shopping_category": null, "gender": null, "age_group": null, "show_sub_categories": 1, "child_category_columns": 2, "custom_sections": 0, "content_below": "", "show_title": 1, "page_wrapper_class": "", "show_products": 1, "easyship_category": null } }

Errors

{ "errors": { "default": [ "Product category not found" ] } }

Update a product category.

PUT /api/v1/product_categories/{category_id}


QUERY PARAMETERS

Field Type Description
category_id numeric Product Category ID (required)

BODY PARAMETERS

Field Type Description
title string Title (required)
layout string Layout (optional)
default | full_page_width | custom
custom_sections boolean Sections (required)
0: Default
1: Custom
child_category_columns numeric Child Category Columns (required)
2: 2 Columns
3: 3 Columns
4: 4 Columns
parent_id numeric Parent Category ID (optional)
content_above string Content (Above Products) (optional)
content_below string Content (Below Products) (optional)
thumbnail_image numeric Thumbnail Image ID (optional)
social_media_image numeric Social Media Image ID (optional)

Delete Product Category

    

Request

DELETE /api/v1/product_categories/{category_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "Product category not found" ] } }

Delete a product category.

DELETE /api/v1/product_categories/{category_id}


QUERY PARAMETERS

Field Type Description
category_id numeric Product Category ID (required)

Get Product List

    

Request

GET /api/v1/products HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": [ { "id": "", "created_at": "", "updated_at": "", "price": "", "primary_category_id": "", "product_option_set_id": "", "title": "", "browser_title": "", "meta_description": "", "content": "", "views": "", "slug": "", "show_breadcrumbs": "", "breadcrumb_name": "", "no_index": "", "no_follow": "", "layout": "", "last_updated_by": "", "thumbnail_image": "", "social_media_image": "", "include_in_google_shopping": "", "availability": "", "condition": "", "featured": "", "featured_order": "", "uses_custom_options": "", "sku": "", "type": "", "price_type": "", "shipping_type": "", "select_shipping_zones": "", "shipping_price": "", "all_shipping_zones": "", "sale_price_enabled": "", "sale_price": "", "sale_starts_at": "", "sale_ends_at": "", "custom_sections": "", "out_of_stock_visible": "", "tax_enabled": "", "brand_id": "", "show_title": "", "google_merchant_shipping_label": "", "page_wrapper_class": "", "weight": "", "width": "", "height": "", "length": "", "track_inventory": "", "quantity_available": "", "easyship_category": "", "use_alternative_buy_option": "", "uses_variants": "", "age_restriction_class_id": "", "tax_code": "", "visibility": "", "fulfillment_methods": [], "use_all_fulfillment_methods": "", "variants": [], "attributes": [], "options": [], "images": [], "categories": [] } ] }

Get product list.

GET /api/v1/products

Get Products Count

Request

    
      GET /api/v1/products/count HTTP/1.1
      Host: yourdomain.com
      Authorization: Bearer {YOUR_API_TOKEN}
    

    

Response

{ "data": { "count": 10 } }

Retrieve products count.

GET /api/v1/products/count

get product

    

Request

GET /api/v1/products/{product_id} HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "id": "", "created_at": "", "updated_at": "", "price": "", "primary_category_id": "", "product_option_set_id": "", "title": "", "browser_title": "", "meta_description": "", "content": "", "views": "", "slug": "", "show_breadcrumbs": "", "breadcrumb_name": "", "no_index": "", "no_follow": "", "layout": "", "last_updated_by": "", "thumbnail_image": "", "social_media_image": "", "include_in_google_shopping": "", "availability": "", "condition": "", "featured": "", "featured_order": "", "uses_custom_options": "", "sku": "", "type": "", "price_type": "", "shipping_type": "", "select_shipping_zones": "", "shipping_price": "", "all_shipping_zones": "", "sale_price_enabled": "", "sale_price": "", "sale_starts_at": "", "sale_ends_at": "", "custom_sections": "", "out_of_stock_visible": "", "tax_enabled": "", "brand_id": "", "show_title": "", "google_merchant_shipping_label": "", "page_wrapper_class": "", "weight": "", "width": "", "height": "", "length": "", "track_inventory": "", "quantity_available": "", "easyship_category": "", "use_alternative_buy_option": "", "uses_variants": "", "age_restriction_class_id": "", "tax_code": "", "visibility": "", "fulfillment_methods": [], "use_all_fulfillment_methods": "", "variants": [], "attributes": [], "options": [], "images": [], "categories": [] } }

Retrieve product detail.

GET /api/v1/products/{product_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)

Create Product

    

Request

POST /api/v1/products HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "title": "title", "layout": "default", "shipping_type": "fixed", "custom_sections": "0", "uses_custom_options": "0", "visibility": "public", "availability": "in_stock", "condition": "new", "shipping_price": "1", "product_images": [], "product_categories": [] }

Response

{ "data": { "id": "", "created_at": "", "updated_at": "", "price": "", "primary_category_id": "", "product_option_set_id": "", "title": "", "browser_title": "", "meta_description": "", "content": "", "views": "", "slug": "", "show_breadcrumbs": "", "breadcrumb_name": "", "no_index": "", "no_follow": "", "layout": "", "last_updated_by": "", "thumbnail_image": "", "social_media_image": "", "include_in_google_shopping": "", "availability": "", "condition": "", "featured": "", "featured_order": "", "uses_custom_options": "", "sku": "", "type": "", "price_type": "", "shipping_type": "", "select_shipping_zones": "", "shipping_price": "", "all_shipping_zones": "", "sale_price_enabled": "", "sale_price": "", "sale_starts_at": "", "sale_ends_at": "", "custom_sections": "", "out_of_stock_visible": "", "tax_enabled": "", "brand_id": "", "show_title": "", "google_merchant_shipping_label": "", "page_wrapper_class": "", "weight": "", "width": "", "height": "", "length": "", "track_inventory": "", "quantity_available": "", "easyship_category": "", "use_alternative_buy_option": "", "uses_variants": "", "age_restriction_class_id": "", "tax_code": "", "visibility": "", "fulfillment_methods": [], "use_all_fulfillment_methods": "", "variants": [], "attributes": [], "options": [], "images": [], "categories": [] } }

Create a product.

POST /api/v1/products


BODY PARAMETERS

Field Type Description
title string Title (required)
sku string SKU (optional)
gtin_type string GTIN type (optional)
UPC | EAN | JAN | ISBN

UPC: 12 characters
EAN: 13 characters
JAN: 8 or 13 characters
ISBN: 13 characters
gtin string GTIN (optional)
layout string Layout (optional)
default | full_page_width | custom
custom_sections boolean Sections (required)
0: Default
1: Custom
uses_custom_options boolean Use custom options (required)
0: Use Option Set
1: Create Custom Options
shipping_type string Shipping type (required)
default: Default
fixed: Fixed Shipping Price
visibility string Visibility (required)
public: Public
unlisted: Unlisted
hidden: Hidden
Help
availability string Availability (required)
in_stock: In stock
out_of_stock: Out of stock
preorder: Preorder
condition string Condition (required)
new: New
used: Used
refurbished: Refurbished
product_categories array Product categories (optional)
product category ids
primary_category_id numeric Primary category id (optional)
One of product_categories
The primary category will shown in breadcrumbs and be included in the url of the product.
product_images array Product images (optional)
product image ids
include_in_google_shopping boolean Include in Google Shopping Feed
0: No
1: Yes
featured boolean Feature Product
0: No
1: Yes
sale_price_enabled boolean Enable sale
0: No
1: Yes
sale_price numeric (required if sale_price_enabled is 1)
Sale price
set_sale_starts_at boolean Set a sale start date
0: No
1: Yes
sale_starts_at datetime (required if set_sale_starts_at is 1)
Sale start date
set_sale_ends_at boolean Set a sale start date
0: No
1: Yes
sale_ends_at datetime (required if set_sale_ends_at is 1)
Sale start date
brand_id numeric Brand id
use_alternative_buy_option boolean Use an alternative buy option
0: No
1: Yes

This will disallow adding product to cart and show a button instead. For example, you may want to show a call to buy button that brings up the phone dialer. Or you may want to direct the customer to a third party website or service.
age_restriction_class_id numeric (optional)
Age Restriction
Setting an age restriction will require that the user confirms their age before purchasing this product.
fulfillment_methods array (optional)
Fulfillment Methods
Available options: shipping, pickup
use_all_fulfillment_methods boolean (optional)
0: No
1: Yes

update product

      

Request

PUT /api/v1/products/{product_id} HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "title": "title", "layout": "default", "shipping_type": "fixed", "custom_sections": "0", "uses_custom_options": "0", "visibility": "public", "availability": "in_stock", "condition": "new", "shipping_price": "1", "product_categories": [1] }

Response

{ "data": { "id": "", "created_at": "", "updated_at": "", "price": "", "primary_category_id": "", "product_option_set_id": "", "title": "", "browser_title": "", "meta_description": "", "content": "", "views": "", "slug": "", "show_breadcrumbs": "", "breadcrumb_name": "", "no_index": "", "no_follow": "", "layout": "", "last_updated_by": "", "thumbnail_image": "", "social_media_image": "", "include_in_google_shopping": "", "availability": "", "condition": "", "featured": "", "featured_order": "", "uses_custom_options": "", "sku": "", "type": "", "price_type": "", "shipping_type": "", "select_shipping_zones": "", "shipping_price": "", "all_shipping_zones": "", "sale_price_enabled": "", "sale_price": "", "sale_starts_at": "", "sale_ends_at": "", "custom_sections": "", "out_of_stock_visible": "", "tax_enabled": "", "brand_id": "", "show_title": "", "google_merchant_shipping_label": "", "page_wrapper_class": "", "weight": "", "width": "", "height": "", "length": "", "track_inventory": "", "quantity_available": "", "easyship_category": "", "use_alternative_buy_option": "", "uses_variants": "", "age_restriction_class_id": "", "tax_code": "", "visibility": "", "fulfillment_methods": [], "use_all_fulfillment_methods": "", "variants": [], "attributes": [], "options": [], "images": [] } }

Update a product.

PUT /api/v1/products/{product_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)

BODY PARAMETERS

Field Type Description
product_id numberic (required)

BODY PARAMETERS

Field Type Description
title string Title (required)
sku string SKU (optional)
gtin_type string GTIN type (optional)
UPC | EAN | JAN | ISBN

UPC: 12 characters
EAN: 13 characters
JAN: 8 or 13 characters
ISBN: 13 characters
gtin string GTIN (optional)
layout string Layout (optional)
default | full_page_width | custom
custom_sections boolean Sections (required)
0: Default
1: Custom
uses_custom_options boolean Use custom options (required)
0: Use Option Set
1: Create Custom Options
shipping_type string Shipping type (required)
default: Default
fixed: Fixed Shipping Price
visibility string Visibility (required)
public: Public
unlisted: Unlisted
hidden: Hidden
Help
availability string Availability (required)
in_stock: In stock
out_of_stock: Out of stock
preorder: Preorder
condition string Condition (required)
new: New
used: Used
refurbished: Refurbished
product_categories array Product categories (optional)
product category ids
primary_category_id numeric Primary category id (optional)
One of product_categories
The primary category will shown in breadcrumbs and be included in the url of the product.
product_images array Product images (optional)
product image ids
include_in_google_shopping boolean Include in Google Shopping Feed
0: No
1: Yes
featured boolean Feature Product
0: No
1: Yes
sale_price_enabled boolean Enable sale
0: No
1: Yes
sale_price numeric (required if sale_price_enabled is 1)
Sale price
set_sale_starts_at boolean Set a sale start date
0: No
1: Yes
sale_starts_at datetime (required if set_sale_starts_at is 1)
Sale start date
set_sale_ends_at boolean Set a sale start date
0: No
1: Yes
sale_ends_at datetime (required if set_sale_ends_at is 1)
Sale start date
brand_id numeric Brand id
use_alternative_buy_option boolean Use an alternative buy option
0: No
1: Yes

This will disallow adding product to cart and show a button instead. For example, you may want to show a call to buy button that brings up the phone dialer. Or you may want to direct the customer to a third party website or service.
age_restriction_class_id numeric (optional)
Age Restriction
Setting an age restriction will require that the user confirms their age before purchasing this product.
fulfillment_methods array (optional)
Fulfillment Methods
Available options: shipping, pickup
use_all_fulfillment_methods boolean (optional)
0: No
1: Yes

delete product

    

Request

DELETE /api/v1/products/{product_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "Product not found" ] } }

Delete a product.

DELETE /api/v1/products/{product_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)

delete product image

    

Request

DELETE /api/v1/products/{product_id}/images/{image_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Delete a product image.

DELETE /api/v1/products/{product_id}/images/{image_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
image_id numeric Image ID (required)

Create Product Attribute

      

Request

POST /api/v1/products/{product_id}/attributes HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "color", "type": "select", "values": ["red", "blue"] }

Response

{ "data": { "id": "", "product_id": "", "name": "color", "type": "select", "sort_order": "", "values": [ { "id": "", "product_attribute_id": "", "name": "red", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "blue", "sort_order": 1 } ] } }

Create a product attribute.

POST /api/v1/products/{product_id}/attributes


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)

BODY PARAMETERS

Field Type Description
name string (required)
type string (required) select | radio
values array (optional)

Update Product Attribute

      

Request

PUT /api/v1/products/{product_id}/attributes/{attribute_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "size", "type": "select", "values": ["s", "m"] }

Response Success

{ "data": { "id": "", "product_id": "", "name": "size", "type": "select", "sort_order": "", "values": [ { "id": "", "product_attribute_id": "", "name": "s", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "m", "sort_order": 1 } ] } }

Errors

{ "errors": { "default": "Product not found" } } { "errors": { "default": "Attribute not found" } }

Update a product attribute.

PUT /api/v1/products/{product_id}/attributes/{attribute_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
attribute_id numeric Attribute ID (required)

BODY PARAMETERS

Field Type Description
name string Name (required)
type string Type (required)
select | radio
values array Values (optional)

Delete Product Attribute

      

Request

DELETE /api/v1/products/{product_id}/attributes/{attribute_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response Success

{ "data": { "status": "ok" } }

Response Error

{ "errors": { "default": "Attribute not found" } }

Delete a product attribute.

DELETE /api/v1/products/{product_id}/attributes/{attribute_id} HTTP/1.1


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
attribute_id numeric Attribute ID (required)

Get Product Variant List

      

Request

GET /api/v1/products/{product_id}/variants HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": [ { "id": "", "product_id": "", "sku": null, "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": null, "tax_enabled": 1, "weight": null, "length": null, "width": null, "height": null, "shipping_price": "0.00", "image_id": null, "values": [ { "id": "", "product_attribute_id": "", "name": "m", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "red", "sort_order": 0 } ] }, { "id": "", "product_id": "", "sku": null, "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": null, "tax_enabled": 1, "weight": null, "length": null, "width": null, "height": null, "shipping_price": "0.00", "image_id": null, "values": [ { "id": "", "product_attribute_id": "", "name": "m", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "blue", "sort_order": 0 } ] }, { "id": "", "product_id": "", "sku": null, "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": null, "tax_enabled": 1, "weight": null, "length": null, "width": null, "height": null, "shipping_price": "0.00", "image_id": null, "values": [ { "id": "", "product_attribute_id": "", "name": "s", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "red", "sort_order": 0 } ] }, { "id": "", "product_id": "", "sku": null, "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": null, "tax_enabled": 1, "weight": null, "length": null, "width": null, "height": null, "shipping_price": "0.00", "image_id": null, "values": [ { "id": "", "product_attribute_id": "", "name": "s", "sort_order": 0 }, { "id": "", "product_attribute_id": "", "name": "blue", "sort_order": 0 } ] } ] }

Errors

{ "errors": { "default": [ "Product not found" ] } }

List a product variants.

GET /api/v1/products/{product_id}/variants


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)

Get Product Variant

      

Request

GET /api/v1/products/{product_id}/variants/{variant_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "id": "", "product_id": "", "sku": "", "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": "0.00", "tax_enabled": "", "weight": "", "length": "", "width": "", "height": "", "shipping_price": "0.00", "image_id": "", "values": [ { "id": 1, "product_attribute_id": "", "name": "m", "sort_order": 0 }, { "id": 3, "product_attribute_id": "", "name": "red", "sort_order": 0 } ] } }

Errors

{ "errors": { "default": [ "Varaint not found" ] } }

Get a product variant.

GET /api/v1/products/{product_id}/variants/{variant_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
variant_id numeric Variant ID (required)

Update Product Variant

      

Request

PUT /api/v1/products/{product_id}/variants/{variant_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "sku": "sku1", "price": "200" }

Response

{ "data": { "id": "", "product_id": "", "sku": "sku1", "condition": "", "availability": "", "track_inventory": 0, "quantity_available": 0, "price": "200.00", "tax_enabled": "", "weight": "", "length": "", "width": "", "height": "", "shipping_price": "0.00", "image_id": "", "values": [ { "id": 1, "product_attribute_id": "", "name": "m", "sort_order": 0 }, { "id": 3, "product_attribute_id": "", "name": "red", "sort_order": 0 } ] } }

Errors

{ "errors": { "default": { "default": "Variant not found" } } }

Update a product variant.

PUT /api/v1/products/{product_id}/variants/{variant_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
variant_id numeric Variant ID (required)

Delete Product Variant

      

Request

DELETE /api/v1/products/{product_id}/variants/{variant_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": { "default": "Product not found" } } }

Delete a product variant.

DELETE /api/v1/products/{product_id}/variants/{variant_id}


QUERY PARAMETERS

Field Type Description
product_id numeric Product ID (required)
variant_id numeric Variant ID (required)

Create Image

    

Request

POST /api/v1/images HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN} Content-Length: XXXXX Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="1.png" Content-Type: image/png (data) ----WebKitFormBoundary7MA4YWxkTrZu0gW

Response

{ "data": { "filename": "1.png", "name": "1.png", "id": 10, "size": 34299, "thumb_url": "http://yourdomain.com/media/thumbs/1.png", "relative_thumb_url": "http://yourdomain.com/media/thumbs/1.png", "edit_url": "http://yourdomain.com/webadmin/media/10/edit" } }

Create a product.

POST /api/v1/images

Delete Image

    

Request

DELETE /api/v1/images/{image_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "File not found" ] } }

Delete a image.

DELETE /api/v1/images/{image_id}


QUERY PARAMETERS

Field Type Description
image_id numeric Image ID (required)

Get Order List

      

Request

GET /api/v1/orders HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

QUERY PARAMETERS

Field Type Description
ids string Order IDs (comma seperated)
since_id numeric Order ID
created_after string Created date (xxxx-xx-xx)
updated_after string Updated date (xxxx-xx-xx)

Response

{ "data": [ { "id": "", "created_at": "", "updated_at": "", "subtotal": "", "tax": "", "shipping": "", "total": "", "status": "", "gateway_reference": "", "payment_provider": "", "payment_method": "", "error_message": "", "shipping_method": "", "shipped_with": "", "tracking_number": "", "coupon": "", "discount": "", "notes": "", "refunded_at": "", "refund_amount": "", "cc_last_four": "", "cc_type": "", "fulfillment_method": "", "pickup_option": "", "status_name": "", "items": [ { "id": 1, "created_at": "", "updated_at": "", "order_id": "", "quantity": "", "price": "", "title": "", "sku": "", "product_id": "", "product_variant_id": "", "product": "" } ], "customer": { "id": "", "created_at": "", "updated_at": "", "order_id": "", "email": "", "billing_address": { "id": "", "created_at": "", "updated_at": "", "customer_id": "", "type": "", "first_name": "", "last_name": "", "address_line_1": "", "address_line_2": "", "city": "", "state": "", "zip": "", "phone": "", "country": "" }, "shipping_address": { "id": "", "created_at": "", "updated_at": "", "customer_id": "", "type": "", "first_name": "", "last_name": "", "address_line_1": "", "address_line_2": "", "city": "", "state": "", "zip": "", "phone": "", "country": "" } } } ] }

Get order list

GET /api/v1/orders

Get Order

      

Request

GET /api/v1/orders/{order_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "id": "", "created_at": "", "updated_at": "", "subtotal": "", "tax": "", "shipping": "", "total": "", "status": "", "gateway_reference": "", "payment_provider": "", "payment_method": "", "error_message": "", "shipping_method": "", "shipped_with": "", "tracking_number": "", "coupon": "", "discount": "", "notes": "", "refunded_at": "", "refund_amount": "", "cc_last_four": "", "cc_type": "", "fulfillment_method": "", "pickup_option": "", "status_name": "", "items": [ { "id": 1, "created_at": "", "updated_at": "", "order_id": "", "quantity": "", "price": "", "title": "", "sku": "", "product_id": "", "product_variant_id": "", "product": "" } ], "customer": { "id": "", "created_at": "", "updated_at": "", "order_id": "", "email": "", "billing_address": { "id": "", "created_at": "", "updated_at": "", "customer_id": "", "type": "", "first_name": "", "last_name": "", "address_line_1": "", "address_line_2": "", "city": "", "state": "", "zip": "", "phone": "", "country": "" }, "shipping_address": { "id": "", "created_at": "", "updated_at": "", "customer_id": "", "type": "", "first_name": "", "last_name": "", "address_line_1": "", "address_line_2": "", "city": "", "state": "", "zip": "", "phone": "", "country": "" } } } }

Get a order

GET /api/v1/orders/3


QUERY PARAMETERS

Field Type Description
order_id numeric Order ID (required)

Get Order Count

      

Request

GET /api/v1/orders/count HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "count": 100 } }

Retrieve orders count.

GET /api/v1/orders/count

Create or update order tracking number

      

Request

POST /api/v1/orders/{order_id}/tracking_number HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "tracking_number": "xxxxx" }

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "Order not found" ] } }

Create or update order tracking number.

POST /api/v1/orders/{order_id}/tracking_number


QUERY PARAMETERS

Field Type Description
order_id numeric Order ID (required)

Get Age Restriction Class List

      

Request

GET /api/v1/age_restriction_classes HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": [ { "id": 3, "name": "Second Restriction", "age": 20, "verification_method": "birthday", "created_at": "2021-11-11T17:57:30.000000Z", "updated_at": "2021-11-11T17:57:30.000000Z" }, { "id": 4, "name": "Alchol Products", "age": 18, "verification_method": "birthday", "created_at": "2021-11-13T16:29:27.000000Z", "updated_at": "2021-11-13T16:29:27.000000Z" } ] }

Get age restriction class list

GET /api/v1/age_restriction_classes

Get Age Restriction Class

      

Request

GET /api/v1/age_restriction_classes/{age_restriction_class_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "id": 4, "name": "Alchol Products", "age": 18, "verification_method": "birthday", "created_at": "2021-11-13T16:29:27.000000Z", "updated_at": "2021-11-13T16:29:27.000000Z" } }

Get age restriction class list

GET /api/v1/age_restriction_classes/{age_restriction_class_id}


QUERY PARAMETERS

Field Type Description
age_restriction_class_id numeric Age Restriction Class ID (required)

Create Age Restriction Class

      

Request

POST /api/v1/age_restriction_classes HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "Alchol Products", "age": "18", "verification_method": "birthday" }

Response

{ "data": { "id": 4, "name": "Alchol Products", "age": 18, "verification_method": "birthday", "created_at": "2021-11-13T16:29:27.000000Z", "updated_at": "2021-11-13T16:29:27.000000Z" } }

Create a brand.

POST /api/v1/age_restriction_classes


BODY PARAMETERS

Field Type Description
name string Name (required)
age numeric Age (required)
verification_method string Verification Method (required, one of 'birthday', 'checkbox')

Update Age Restriction Class

      

Request

PUT /api/v1/age_restriction_classes/{age_restriction_class_id} HTTP/1.1 Authorization: Bearer {YOUR_API_TOKEN} Content-Type: application/json { "name": "Spirit Product", "age": "24", "verification_method": "checkbox" }

Response

{ "data": { "id": 4, "name": "Spirit Product", "age": "24", "verification_method": "checkbox" "created_at": "2021-11-11T16:29:27.000000Z", "updated_at": "2021-11-13T16:29:27.000000Z" } }

Errors

{ "errors": { "default": [ "Entity not found" ] } }

Update an age restriction class.

PUT /api/v1/age_restriction_classes/{age_restriction_class_id}


QUERY PARAMETERS

Field Type Description
age_restriction_class_id numeric Age Restriction Class ID (required)

BODY PARAMETERS

Field Type Description
name string Name (required)
age numeric Age (required)
verification_method string Verification Method (required, one of 'birthday', 'checkbox')

Delete Age Restriction Class

    

Request

DELETE /api/v1/age_restriction_classes/{age_restriction_class_id} HTTP/1.1 Host: yourdomain.com Authorization: Bearer {YOUR_API_TOKEN}

Response

{ "data": { "status": "ok" } }

Errors

{ "errors": { "default": [ "Entity not found" ] } }

Delete an Age Restriction Class.

DELETE /api/v1/age_restriction_classes/{age_restriction_class_id}


QUERY PARAMETERS

Field Type Description
age_restriction_class_id numeric Age Restriction Class ID (required)