Category API
The Category APIs group like products together on a page. Categories have a many-to-many relationship with products.
In this topic:
Fields
- user_id (string)
A unique id that represents a user account on Weebly. - site_id (string)
The site id that is unique to the user. - category_id (string)
The unique category id (within the store) of the product. - name (string)
The name of the store category. - parent_category_id (string)
The category id of the parent, if the category is a sub-category. - created_date (timestamp/integer)
A timestamp of the creation date of the category. - updated_date (timestamp/integer)
A timestamp of the last updated date of the category. - seo_page_title (string)
The meta tag title of the page embedded for search engines. - seo_page_description (string)
The meta tag description of the page embedded for search engines. - product_ids (array of integers)
An array of product sku ids within the store category. - images (array)
A list of all the category images for this store category.
GET /user/USER_ID/site/SITE_ID/store/category
Returns the following fields for all categories in a store:
- user_id
- site_id
- category_id
- name
- parent_category_id
- images
- filterby (string)
Field name to set a filter on. - filterfor (string)
Value to search filterby field for.
You can use the following URL encoded operators with your filterfor parameter:- < use %3C
- > use %3E
- <= use %3C%3D
- >= use %3E%3D
Example CURL Request
Example Response
Example CURL Request with Parameters
Example Response
GET /user/USER_ID/site/SITE_ID/store/category/count
Returns the number of categories for the given site, unless filtered or limited by search parameters.
Example CURL Request
Example Response
POST /user/USER_ID/site/SITE_ID/store/category
Creates a category.
Required: name
Optional:
Required: name
Optional:
- seo_page_title
- seo_page_description
- product_ids
- parent_category_id
Example CURL Request
Example Response
GET /user/USER_ID/site/SITE_ID/store/category/CATEGORY_ID
Returns all fields for the given category.
Example CURL Request
Example Response
PATCH /user/USER_ID/site/SITE_ID/store/category/CATEGORY_ID
Updates a category. You can update the following fields:
- name
- seo_page_title
- seo_page_description
- product_ids
- parent_category_id
Example CURL Request
Example Response
PUT /user/USER_ID/site/SITE_ID/store/category/CATEGORY_ID
Replaces the category.
Required: name
Optional:
Required: name
Optional:
- seo_page_title
- seo_page_description
- product_ids
- parent_category_id
Example CURL Request
Example Response
DELETE /user/USER_ID/site/SITE_ID/store/category/CATEGORY_ID
Deletes the category.
Example CURL Request
No response is returned.