Store offerings are called products. Before products can be displayed in a store, they must be created in the site.

There are three different types of products:

  • Physical: Products that are tangible and are delivered to the customer. These can have shipping fees associated with them.
  • Service: Products that are not tangible, like landscaping or babysitting.
  • Digital: Products that are files that the customer downloads. These can have download limits based on time or on the number of downloads.

While merchants can always create products, only stores whose sites are on the Starter plan or better can actually sell products. And some plans have restrictions on the quantity and type of products that can be sold. More info on plans here. ​

Products can be assigned to categories in order to group similar items together. And like categories, products can have one or more images used for display in the store. Products can be taxable (by default they are) and can have a sale price and a regular price.

Products are made up of an array of SKUs. A SKU is the combination of a product options and a product option choice (more about how merchants create options in Weebly here).

Product options are things like Color and have an array of option choices, like red, green, and blue. For example, a T-shirt might have the options Color and Size. The option Color might have an array of choices like red and yellow, while the option Size might have choices of small, medium, and large. So one SKU might have the option choices of red and medium. Another SKU might have red and large as option choices.

Each SKU can have a different price, a different image, etc. When you create a product, you must provide an array of SKU objects, even if there is only one in the array.

Any changes to products that have more than one option choice must be done at the Product level. You can’t change an option to add a new choice. You need to change the product to add a new option_choice and new array of SKU objects that includes that new choice. For example, if you wanted to add yellow as an option for the T-shirt, you’d need to do a PUT with the new option_choice of yellow, and an array of all the SKUs available, which would now be all the size and color combinations, including yellow. After you update the product with the new SKUs, you can then update choices on the Product Option to change the order of the colors, so that maybe yellow comes first. ​ Once created, you can change the individual product SKUs. For example, you might change the price.

Use the following APIs to manage different aspects of a product:

  • Product Options: Use view current options (like Size or Color) and to change the order that options are displayed for a product. For example, you might want Size to come before Color.
  • Product SKUs: Use this API to view the current SKUs for a product, and to set prices, inventory, and weight on individual SKUs (like a red T-shirt in size small) when they are different from a parent product.
  • Product SKU Option Choices: Use to view the current option choices for a given SKU.
  • Product Images: Use to view, create, and delete images used to display the product.

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 for PUT and POST, and those that are changeable using PATCH and PUT. All fields are returned when you retrieve a single item.

Name Description Type List Required Replaceable Changeable
user_id The unique ID of the authenticated user string X
site_id ID of a Weebly site, unique to the currently authenticated user​ string X
url URL to the product's page in the website, for example: ​https://mysite.weebly.com/store/p1/Apples.html string X
product_id Unique ID (to this store) for the product. string X
name Name of the product. string X X X X
short_description Description given to the product. string X X
published Deprecated as of 6/27/18.
Use visibility instead.
visibility Determines how the product is displayed in the store.
Valid values are:
  • visible: Product iss shown in the store and is available for purchase.
  • hidden: Product is hidden from the store, but can still be accessed by going directly to the product's URL. It's available for purchase.
  • unavailable: Product isn't shown anywhere in the website and can't be purchased.
string X X X
taxable Whether or not the product is taxable in this store.
Valid values are:
  • true
  • false
boolean X
price_low Lowest price for this product based on prices for all SKUs of this product. integer X
price_high Highest price for this product based on prices for all SKUs of this product. integer X
sale_price_low Lowest sale price for this product based on sale prices for all SKUs of this product. integer X
sale_price_high Highest sale price for this product based on sale prices for all SKUs of this product. integer X
inventory The cumulative amount of SKUs currently on hand for this product. integer X
category_ids IDs for all categories that this product is assigned to. string
coupon_ids IDs for all coupons that currently affect this product. string
skus Array of SKUs for this product. The array includes each possible combination of options and their values. array X X
images Array of image objects used to display this product on the site. array X X
image_order 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. array of product_image_ids X X
available Whether or not the product is sellable. A product is sellable if the site's plan allows the product to be sold. While merchants can always create products, only stores whose sites on certain plans can actually sell products. And some plans have restrictions on the quantity and type of products that can be sold. More info on plans here. Use plan_level on the Sites API to determine the site's current plan. array of product_image_ids X X
options Array of Array of options created for this sku, for example Color, Size. array X
created_date Date the product was created. Unix GMT Timestamp

updated_date Date the product was last updated. Unix GMT Timestamp

GET
Retrieve a List of Products for a Store

GET /v1/user/sites/{SITE_ID}/store/products

Returns all products for the given site. Only list fields are returned.


scope: read:store-catalog

Query Parameters

Returned values are paginated. You can further filter results using these parameters:

Parameter Description Type
page Which page of results to return. Start is 1. integer
limit Number of results per page to return. Default is 25.
Max is 200.
integer
query Use to retrieve only pages that have a full-text match with the query string. string
filterby Field name to set a filter on. string
filterfor ​​​Value to search the 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
string
sortby Field name to sort by string
sortdir Sort direction. Valid values are:
  • asc
  • desc
string

Example CURL request returning all products:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/store/products \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example filtered request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/store/products?filterby=price_low&filterfor=%3 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example response:

[
    {
        "user_id": "123456",
        "site_id": "987654321",
        "url": "https://987654321.weebly.com/store/p1/Apples.html",
        "product_id": "1",
        "name": "Apples",
        "visibility": "visible",
        "price_low": 1,
        "price_high": 1,
        "sale_price_low": null,
        "sale_price_high": null,
        "inventory": 1,
        "available": true,
        "images": [
            {
                "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p1_i1_w5184.jpeg",
                "product_id": "1",
                "product_image_id": 1,
                "user_id": "123456",
                "site_id": "987654321",
            },
            {
                "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p1_i2_w3839.jpeg",
                "product_id": "1",
                "product_image_id": 2,
                "user_id": "123456",
                "site_id": "987654321",
            }
        ]
    },
    {
        "user_id": "123456",
        "site_id": "987654321",
        "url": "https://mystore.weebly.com/store/p2/Asparagus.html",
        "product_id": "2",
        "name": "Asparagus",
        "visibility": "visible",
        "price_low": 1,
        "price_high": 1,
        "sale_price_low": null,
        "sale_price_high": null,
        "inventory": null,
        "available": true,
        "images": [
            {
                "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p2_i1_w3840.jpeg",
                "product_id": "2",
                "product_image_id": 1,
                "user_id": "123456",
                "site_id": "987654321",
            },
            {
                "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p2_i2_w1706.jpeg",
                "product_id": "2",
                "product_image_id": 2,
                "user_id": "123456",
                "site_id": "987654321",
            }
        ]
    },
    {
        "user_id": "123456",
        "site_id": "987654321",
        "url": "https://mystore.weebly.com/store/p3/Beans.html",
        "product_id": "3",
        "name": "Beans",
        "visibility": "visible",
        "price_low": 1,
        "price_high": 1,
        "sale_price_low": null,
        "sale_price_high": null,
        "inventory": null,
        "available": true,
        "images": [
            {
                "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p3_i1_w2509.jpeg",
                "product_id": "3",
                "product_image_id": 1,
                "user_id": "123456",
                "site_id": "987654321",
            }
        ]
    }
]

GET
Retrieve the Number of Products for a Store

GET /v1/user/sites/{SITE_ID}/store/products/count

Returns the number of products in the store.


scope: read:store-catalog

Example CURL request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/count \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example response:

{
    "count": 25
}

GET
Retrieve Details for a Product

GET /v1/user/sites/{SITE_ID}/store/products/{PRODUCT_ID}

Returns all fields for the given product.


scope: read:store-catalog

Example CURL request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/32 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example response:

See Fields table. All fields for the product are returned.

{
    "user_id": "123456",
    "site_id": "987654321",
    "url": "https://mystore.weebly.com/store/p32/tshirt.html",
    "product_id": "32",
    "name": "tshirt",
    "short_description": "100% Cotton TShirt",
    "visibility": "visible",
    "taxable": true,
    "price_low": 10.99,
    "price_high": 10.99,
    "sale_price_low": null,
    "sale_price_high": null,
    "inventory": 12,
    "available": true,
    "category_ids": [
        "9"
    ],
    "coupon_ids": [
        "3"
    ],
    "created_date": 1445624825,
    "updated_date": 1476384556,
    "skus": [
        {
            "current_price": 10.99,
            "product_id": "32",
            "product_sku_id": "1",
            "sku": "123456",
            "price": 10.99,
            "sale_price": null,
            "inventory": 5,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445624825,
            "updated_date": 1476384555,
            "files": [],
            "optionchoices": [
                {
                    "product_id": "32",
                    "product_sku_id": "1",
                    "product_sku_optionchoice_id": "1",
                    "name": "Color",
                    "choice": "Red",
                    "option_type": "color",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1445640819,
                    "updated_date": 1463002999
                },
                {
                    "product_id": "32",
                    "product_sku_id": "1",
                    "product_sku_optionchoice_id": "2",
                    "name": "Size",
                    "choice": "small",
                    "option_type": "radio",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1476384555,
                    "updated_date": 1476384555
                }
            ]
        },
        {
            "current_price": 10.99,
            "product_id": "32",
            "product_sku_id": "2",
            "sku": "67890",
            "price": 10.99,
            "sale_price": null,
            "inventory": 5,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445640819,
            "updated_date": 1476384555,
            "files": [],
            "optionchoices": [
                {
                    "product_id": "32",
                    "product_sku_id": "2",
                    "product_sku_optionchoice_id": "1",
                    "name": "Color",
                    "choice": "red",
                    "option_type": "color",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1445640819,
                    "updated_date": 1463002999
                },
                {
                    "product_id": "32",
                    "product_sku_id": "2",
                    "product_sku_optionchoice_id": "2",
                    "name": "Size",
                    "choice": "large",
                    "option_type": "radio",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1476384555,
                    "updated_date": 1476384555
                }
            ]
        },
    "images": [
        {
            "url": "http://mystore.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p32_i2_w3096.jpeg",
            "product_id": "32",
            "product_image_id": 2,
            "width": "3096",
            "height": "4128",
            "format": "jpeg",
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445640702,
            "updated_date": 1445640702
        }
    ],
    "options": [
        {
            "product_id": "32",
            "product_option_id": 1,
            "name": "Color",
            "renderer": "color",
            "choice_order": [
                "Red"
            ],
            "required": false,
            "max_length": false,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445640819,
            "updated_date": 1445640877
        },
        {
            "product_id": "32",
            "product_option_id": 2,
            "name": "Size",
            "renderer": "radio",
            "choice_order": [
                "Small",
                "Large"
            ],
            "required": false,
            "max_length": false,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1476384556,
            "updated_date": 1476384556
        }
    ]
}

POST
Create a Product

POST /v1/user/sites/{SITE_ID}/store/products

Creates a product for the given store.


scope: write:store-catalog

These fields can be created:

Name Description Type Notes
name Name of the product. string Required
short_description Description given to the product. string
skus Array of SKUs for this product. The array includes each possible combination of options and their values. array Required
images Array of image objects used to display this product on the site. array
options Array of Array of options created for this sku, for example Color, Size. array

Example CURL request:

curl --request POST \
--url https://api.weebly.com/v1/user/sites/987654321/store/products \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"
--data '{
            "name": "My Product",
            "skus": [
                {
                    "price": 9.99,
                    "product_type": "physical"
                }
            ]
        }'

Example response:

{
    "user_id": "123456",
    "site_id": "987654321",
    "url": "https://mystore.weebly.com/store/p68/My_Product.html",
    "product_id": "68",
    "name": "My Product",
    "short_description": null,
    "visibility": "visible",
    "taxable": true,
    "price_low": 9.99,
    "price_high": 9.99,
    "sale_price_low": null,
    "sale_price_high": null,
    "inventory": null,
    "available": true,
    "category_ids": [],
    "coupon_ids": [],
    "created_date": 1476402086,
    "updated_date": 1476402086,
    "skus": [
        {
            "current_price": 9.99,
            "product_id": "68",
            "product_sku_id": "1",
            "sku": null,
            "price": 9.99,
            "sale_price": null,
            "inventory": null,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1476402086,
            "updated_date": 1476402086,
            "files": [],
            "optionchoices": []
        }
    ],
    "images": [],
    "options": []
}

Request to create a product with options

This example shows how to create a product with two options - Color with one choice of Red, and Size with two choices, Small and Large. One SKU is created - a tshirt in red and small.

Example CURL request:

curl --request POST \
--url https://api.weebly.com/v1/user/sites/987654321/ \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"' \
--data '{
            "name": "Newest Product with options",
            "options": [
                {
                    "name": "Color",
                    "renderer": "color",
                    "choice_order": [
                    "Red"]
                },
                {
                    "name": "Size",
                    "renderer": "radio",
                    "choice_order": [
                        "Small",
                        "Large"
                    ]

                }
            ],
            "skus": [
                {
                    "price": 10.99,
                    "product_type": "physical",
                    "optionchoices": [
                        {
                            "name": "Color",
                            "choice": "Red",
                            "option_type": "color"
                        },
                        {
                            "name": "Size",
                            "choice": "Small",
                            "option_type": "radio"
                        }
                    ]
                }
            ]
        }'

PUT
Replace (Copy) a Product

PUT /v1/user/sites/{SITE_ID}/store/products/{PRODUCT_ID}

Replaces the given product. Use this to copy an existing product by replacing the product_id and updating other fields. Any fields not sent will be copied from the product used in the request.

Also use this endpoint to add/change/delete the SKUs for a product. For example, if you wanted to add the color option of yellow to a product, you’d use PUT to add the option choice of yellow and replace skus with all the available options, including yellow. You can then use the PATCH endpoint from the Product Options API to change the order.


scope: write:store-catalog

These fields can be replaced:

Name Description Type Notes
name Name of the product. string Required
short_description Description given to the product. string
visibility Determines how the product is displayed in the store.
Valid values are:
  • visible: Product iss shown in the store and is available for purchase.
  • hidden: Product is hidden from the store, but can still be accessed by going directly to the product's URL. It's available for purchase.
  • unavailable: Product isn't shown anywhere in the website and can't be purchased.
string
taxable Whether or not the product is taxable in this store.
Valid values are:
  • true
  • false
boolean
skus Array of SKUs for this product. The array includes each possible combination of options and their values. array Required
images Array of image objects used to display this product on the site. array
options Array of Array of options created for this sku, for example Color, Size. array Required if product includes options.

Example CURL request:

curl --request PUT \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/68 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"
--data '{
            "name": "My Copied Product",
            "product_id": "100",
            "skus": [
                {
                    "price": 9.99,
                    "product_type": "physical",
                }
            ]
        }'

Example response:

{
    "user_id": "123456",
    "site_id": "987654321",
    "url": "https://mystore.weebly.com/store/p100/My_Copied_Product.html",
    "product_id": "100",
    "name": "My Copied Product",
    "short_description": null,
    "visibility": "visible",
    "taxable": false,
    "price_low": 9.99,
    "price_high": 9.99,
    "sale_price_low": null,
    "sale_price_high": null,
    "inventory": null,
    "available": true,
    "category_ids": [
        "10"
    ],
    "coupon_ids": [],
    "created_date": 1445559772,
    "updated_date": 1445559793,
    "skus": [
        {
            "current_price": 9.99,
            "product_id": "100",
            "product_sku_id": "1",
            "sku": null,
            "price": 9.9,
            "sale_price": null,
            "inventory": null,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445559772,
            "updated_date": 1463002993,
            "files": [],
            "optionchoices": []
        }
    ],
    "images": [
        {
            "url": "http://821263702103547270.weebly.com/uploads/5/4/9/1/54914441/s242778913223969860_p3_i1_w2509.jpeg",
            "product_id": "100",
            "product_image_id": 1,
            "width": "2509",
            "height": "1673",
            "format": "jpeg",
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1445559780,
            "updated_date": 1445559780
        }
    ],
    "options": []
}

Example request to add options to a product

This request shows adding the option choice of Yellow for Color and adding a new sku that has the option choice of Yellow for Color and Small for Size. Note that the existing SKU of Red and Small still needs to be sent in the request.

Example CURL request:

curl --request PUT \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/68 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"
--data '{
            "name": "Newest Product with options",
            "options": [
                {
                    "name": "Color",
                    "renderer": "color",
                    "choice_order": [
                        "red",
                        "yellow"
                    ]
                },
                {
                    "name": "Size",
                    "renderer": "radio",
                    "choice_order": [
                        "Small",
                        "Large"
                    ]
                }
            ],
            "skus": [
                {
                    "price": 10.99,
                    "product_type": "physical",
                    "optionchoices": [
                        {
                            "name": "Color",
                            "choice": "red",
                            "option_type": "color"
                        },
                        {
                            "name": "Size",
                            "choice": "small",
                            "option_type": "radio"
                        }
                    ]
                },
                {
                    "price": 10.99,
                    "product_type": "physical",
                    "optionchoices": [
                        {
                            "name": "Color",
                            "choice": "yellow",
                            "option_type": "color"
                        },
                        {
                            "name": "Size",
                            "choice": "small",
                            "option_type": "radio"
                        }
                    ]
                }
            ]
    }'

Example response:

{
    "user_id": "123456",
    "site_id": "987654321",
    "url": "https://mystore.weebly.com/store/p21/Newest_Product_with_options.html",
    "product_id": "21",
    "name": "Newest Product with options",
    "short_description": null,
    "visibility": "visible",
    "taxable": true,
    "price_low": 10.99,
    "price_high": 10.99,
    "sale_price_low": null,
    "sale_price_high": null,
    "inventory": null,
    "category_ids": [],
    "coupon_ids": [],
    "created_date": 1490633793,
    "updated_date": 1490635265,
    "skus": [
        {
            "current_price": 10.99,
            "product_id": "21",
            "product_sku_id": "2",
            "sku": null,
            "price": 10.99,
            "sale_price": null,
            "inventory": null,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1490635265,
            "updated_date": 1490635265,
            "files": [],
            "optionchoices": [
                {
                    "product_id": "21",
                    "product_sku_id": "2",
                    "product_sku_optionchoice_id": "1",
                    "name": "Color",
                    "choice": "red",
                    "option_type": "color",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1490635265,
                    "updated_date": 1490635265
                },
                {
                    "product_id": "21",
                    "product_sku_id": "2",
                    "product_sku_optionchoice_id": "2",
                    "name": "Size",
                    "choice": "small",
                    "option_type": "radio",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1490635265,
                    "updated_date": 1490635265
                }
            ]
        },
        {
            "current_price": 10.99,
            "product_id": "21",
            "product_sku_id": "3",
            "sku": null,
            "price": 10.99,
            "sale_price": null,
            "inventory": null,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1490635265,
            "updated_date": 1490635265,
            "files": [],
            "optionchoices": [
                {
                    "product_id": "21",
                    "product_sku_id": "3",
                    "product_sku_optionchoice_id": "1",
                    "name": "Color",
                    "choice": "yellow",
                    "option_type": "color",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1490635265,
                    "updated_date": 1490635265
                },
                {
                    "product_id": "21",
                    "product_sku_id": "3",
                    "product_sku_optionchoice_id": "2",
                    "name": "Size",
                    "choice": "small",
                    "option_type": "radio",
                    "user_id": "123456",
                    "site_id": "987654321",
                    "created_date": 1490635265,
                    "updated_date": 1490635265
                }
            ]
        }
    ],
    "images": [],
    "options": [],
    "available": true
}

PATCH
Update a Product

PATCH /v1/user/sites/{SITE_ID}/store/products/{PRODUCT_ID}

Updates the given product.


scope: write:store-catalog

These fields can be updated:

Name Description Type
name Name of the product. string
short_description Description given to the product. string
visibility Determines how the product is displayed in the store.
Valid values are:
  • visible: Product iss shown in the store and is available for purchase.
  • hidden: Product is hidden from the store, but can still be accessed by going directly to the product's URL. It's available for purchase.
  • unavailable: Product isn't shown anywhere in the website and can't be purchased.
string

If you want to add/change/delete the SKUs for a product, use the PUT endpoint instead. For example, if you wanted to add the color option of yellow to a product, you’d use PUT and replace sku with all the available options, including yellow. You can then use the PATCH endpoint from the Product Options API to change the order.

Example CURL request:

curl --request PATCH \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/64 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"
--data '{
            "name":"My Updated Product"
        }'

Example response:

See Fields table. All fields for the product are returned.

{
    "user_id": "123456",
    "site_id": "987654321",
    "url": "https://mysite.weebly.com/store/p64/My_Updated_Product.html",
    "product_id": "64",
    "name": "My Updated Product",
    "short_description": "This is a great product!",
    "visiblity": "visible",
    "taxable": true,
    "price_low": 12.99,
    "price_high": 12.99,
    "sale_price_low": null,
    "sale_price_high": null,
    "inventory": 12,
    "available": true,
    "category_ids": [
        "1",
        "5"
    ],
    "coupon_ids": [],
    "created_date": 1472521895,
    "updated_date": 1476406470,
    "skus": [
        {
            "current_price": 12.99,
            "product_id": "64",
            "product_sku_id": "2",
            "sku": null,
            "price": 12.99,
            "sale_price": null,
            "inventory": 12,
            "weight": null,
            "product_type": "physical",
            "download_limit_type": null,
            "download_units_remaining": null,
            "user_id": "123456",
            "site_id": "987654321",
            "created_date": 1476405065,
            "updated_date": 1476405065,
            "files": [],
            "optionchoices": []
        }
    ],
    "images": [],
    "options": []
}

DELETE
Delete a Product

DELETE /v1/user/sites/{SITE_ID}/store/products/{PRODUCT_ID}

Deletes the given product.


scope: write:store-catalog

Example CURL request:

curl --request DELETE \
--url https://api.weebly.com/v1/user/sites/987654321/store/products/64 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Response

There is no response to a delete request.


Help make these docs better!









Tags: