THE API BASICS
Catalog API
Description: Get your products and categories data with this API.
Default URL: https://your-site.com/api/catalog
Response/return: Cart Boxx APIs will always return a standard response, most data will be put into the “cb-more” response field – Check out function verbose in the library reference.
Example Usage
$.ajax({
url : "https://your-site.com/api/catalog",
data : {
req : "get-cat",
category_id : 1
}
}).done(
// DO YOUR PROCESSING HERE
);
CATEGORY RELATED
req: get-all-cat
Description: Get all categories
Parameters
[INT] $_POST[‘page’] – Current page number
req: get-cat
Description: Get category
Parameters
[INT/ARRAY] $_POST[‘category_id’] – A single category ID, or array of category IDs.
req: get-cat-slug
Description: Get category by slug
Parameters
[STRING] $_POST[‘category_slug’] – Category slug
PRODUCTS RELATED
req: count-pdt
Description: Count number of products, for pagination use.
Parameters
[STRING] $_POST[‘search’] – Optional, search for this product name
req: get-all-pdt
Description: Get all products.
Parameters
[STRING] $_POST[‘search’] – Optional, search for this product name
req: get-pdt-cat
Description: Get products in category
Parameters
[INT] $_POST[‘category_id’] – Category ID
req: get-pdt
Description: Get product by ID
Parameters
[INT] $_POST[‘product_id’] – Product ID