Store Categories API
Stores use categories to group and display similar products. Categories can be nested. Products can be assigned to one or more categories.
Use the Categories API to retrieve category information, as well as to update, replace, create, and delete categories.
Use the Categories API to retrieve category information, as well as to update, replace, create, and delete categories.
Note: To authenticate with the Weebly API, you need to use OAuth. This will allow you to access resources based on a particular user and site.
In this topic:
Fields
The following table shows all fields that exist for this API, those that are returned when you retrieve a list, those that are required when you use POST or PUT, and those that are changeable using PATCH or PUT. All fields are returned when you retrieve a single item.
Name |
Description |
Type |
List |
Reqd |
Change- able |
user_id |
The unique ID of the user authenticated during the OAuth process. |
string |
X |
||
site_id |
Unique ID that the store is associated with. |
string |
X |
||
url |
Direct URL to the category's page. |
string |
|||
category_id |
Unique ID (to the store) of the category. |
string |
X |
||
name |
Name of the category. |
string |
X |
X |
X |
seo_page_title |
The SEO title for the category. Site owners can create a title as a meta tag used by search engines. |
string |
X |
||
seo_page_description |
The SEO description for the category. Site owners can create a title as a meta tag used by search engines. |
string |
X |
||
product_ids |
The unique ID (to the store) of all products associated with this category. |
string |
X |
||
images |
An array of images to display for this category. Use the Category Images API to work with images. |
array |
X |
|
|
parent_category_id |
For nested categories, ID of the category that is the parent to this category. |
string |
X |
X |
|
created_date |
The date the category was created. |
Unix timestamp in GMT |
|||
updated_date |
The date the category was last updated. |
Unix timestamp in GMT |
Note: Any fields returned that are not documented are currently unsupported and can be safely ignored.
Retrieve a List of Categories
Endpoint URL
Returns all categories created for this site's store.
Scope: read:store-catalog
Query Parameters
Parameter |
Description |
Type |
page |
Which page of results to return. Start is 1. Note: Only the first 25 results are returned by default. If the result set is expected to be over 25, you must implement pagination. |
integer |
limit |
Number of results per page to return. Default is 25. Max is 200. |
integer |
filterby |
Field name to set a filter on. |
string |
filterfor |
Value to search the filterby field for. You can use the URL encoded characters for following operators:
|
string |
Request
Example returning all categories:
Example of filtered request
Response
Response
Retrieve Details for a Category
Enpoint URL
Returns the details for a category.
Scope: read:store-catalog
Scope: read:store-catalog
Request
Example request
Response
See Fields table. All fields for the group are returned.
Example response
Retrieve the Number of Categories
Endpoint URL
Returns the number of categories that this store has.
Scope: read:store-catalog
Scope: read:store-catalog
Request
Example request
Response
Example response
Create a Category
Endpoint URL
Creates a new category for the given site.
Scope: write:store-catalog
Scope: write:store-catalog
POST body
These fields can be created.
Name |
Description |
Type |
Notes |
name |
Name for the category |
string |
Required |
product_ids |
The unique ID (to the store) of all products associated with this category. |
string |
|
parent_category_id |
ID of the category that is the parent to this category, if one exists. |
string |
|
seo_page_title |
The SEO title for the category. Site owners can create a title as a meta tag used by search engines. |
string |
|
seo_page_description |
The SEO description for the category. Site owners can create a title as a meta tag used by search engines. |
string |
Request
Example request
Response
Example response
Replace a Category
Endpoint URL
Replaces a category for the given site.
Scope: write:store-catalog
Scope: write:store-catalog
PUT body:
These fields can be replaced.
Name |
Description |
Type |
Notes |
name |
Name for the category |
string |
Required |
product_ids |
The unique ID (to the store) of all products associated with this category. |
string |
|
parent_category_id |
ID of the category that is the parent to this category, if one exists. |
string |
|
seo_page_title |
The SEO title for the category. Site owners can create a title as a meta tag used by search engines. |
string |
|
seo_page_description |
The SEO description for the category. Site owners can create a title as a meta tag used by search engines. |
string |
Request
Example request
Response
Example response
Update a Category
Endpoint URL
Updates the given categories.
Scope: write:store-catalog
Scope: write:store-catalog
Updateable Fields
These fields can be updated.
Name |
Description |
Type |
name |
Name for the category |
string |
product_ids |
The unique ID (to the store) of all products associated with this category. |
string |
parent_category_id |
ID of the category that is the parent to this category, if one exists. |
string |
seo_page_title |
The SEO title for the category. Site owners can create a title as a meta tag used by search engines. |
string |
seo_page_description |
The SEO description for the category. Site owners can create a title as a meta tag used by search engines. |
string |
Request
Example request
Response
Example response
Delete a Category
Endpoint URL
Deletes the given category.
Scope: write:store-catalog
Scope: write:store-catalog
Request
Example request
Response
There is no response to a delete request.