Product API
The Product API manages the product catalog for a given site's store.
Products are made up of an array of options and SKUs. Options are things like color, that have an array of choices. For example, a T-shirt might have an array of options, like Color and Size. The option Color might have the array of choices of red and green, while the option Size might have choices of Small, Medium, and Large.
The combination of a single option and an option choice is a SKU. For example, a red T-shirt in medium is one SKU, while a red T-shirt in large is another SKU.
Products are made up of an array of options and SKUs. Options are things like color, that have an array of choices. For example, a T-shirt might have an array of options, like Color and Size. The option Color might have the array of choices of red and green, while the option Size might have choices of Small, Medium, and Large.
The combination of a single option and an option choice is a SKU. For example, a red T-shirt in medium is one SKU, while a red T-shirt in large is another SKU.
In this topic:
Fields
- user_id (string)
A unique id that represents a user account at Weebly - site_id (string)
Site id unique to the user - product_id (string)
The unique product id (within the store) of the product - name (string)
The name of the product - short_description (html string)
The description of the product - published (boolean)
True if the product is published and live on the site - taxable (boolean)
True if the product is taxable - url (string) [calculated]
The fully qualified url of the product, if both it and the site are published - price_low (string) [calculated]
The lowest price in the range of prices for this product based on its skus - price_high (string) [calculated]
The highest price in the range of prices for this product based on its skus - sale_price_low (string) [calculated]
The lowest sale price in the range of prices for this product based on its skus - sale_price_high (string) [calculated]
The highest sale price in the range of prices for this product based on its skus - inventory (string) [calculated]
The cumulative inventory of all skus for this product - skus (array)
A list of all the product skus for this product - images (array)
A list of all the product images for this product - image_order (array)
An ordered list of the product's images by their product_image_id. For example, if a product has three images whose IDs are 3, 6, 7, the array shows the order in which those images are displayed. Note that by default, images are displayed in the order they are uploaded. While that order can't be changed using the API, site owners can change the order from the Weebly editor. Returns null if there are no images. - options (array)
A list of all the options for this product - categories (array of int)
A list of all the category ids for this product
GET /user/USER_ID/site/SITE_ID/store/product
Returns an array of products for a store, with these fields:
- user_id
- site_id
- product_id
- name
- published
- price_low
- price_high
- sale_price_low
- sale_price_high
- inventory
- images
- image_order
- query (string) Filter
Use this parameter to retrieve only products that have a full text search match based on the query string.
- 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
- sortby (string)
Field name to sort on. - sortdir (string)
Use asc for ascending sort or desc for descending sort.
Example CURL Request
Example Response
Example CURL Request with Parameters
Example Filtered Response
GET /user/USER_ID/site/SITE_ID/store/product/count
Returns the number of products for the store, unless filtered or limited by search parameters.
Example CURL Request
Example Response
POST /user/USER_ID/site/SITE_ID/store/product
Creates a new product.
Required:
Required:
- name
- skus
A sku is made up of a price and a product type.
Example CURL Request
Example Response
GET /user/USER_ID/site/SITE_ID/store/product/PRODUCT_ID
Returns all fields for a given product.
Example CURL Request
Example Response
PATCH /user/USER_ID/site/SITE_ID/store/product/PRODUCT_ID
Updates a product. You can update the following:
- name
- short_description
- published
Example CURL Response
Example Response
PUT /user/USER_ID/site/SITE_ID/store/product/PRODUCT_ID
Replaces the product using the given values.
Required:
Required:
- name
- skus
A sku is made up of a price and a product type.
Example CURL Request
Example Response
DELETE /user/USER_ID/site/SITE_ID/store/product/PRODUCT_ID
Deletes the given product.
Example CURL Request
No response is returned