A site can have one online store. The plan that the site uses determines the functionality available to that store. For example, more premium plans allow a greater number of products, custom domain checkout, as well as more advanced functionality like automatic tax calculation and shipping rates. Use plan_level on the Site API to determine the site’s current plan.

Use the Store API to get and update information about a site’s store.

Fields

The following table shows all the fields that exist for this API and which are changeable using PATCH. Sites can have only one store, so you can only get details for that one store.

Name Description Type Changeable
user_id The unique ID of the authenticated user string
site_id ID of a Weebly site, unique to the currently authenticated user​ string
company_name The name given to the store. string X
street The store's street address. string X
street2 Secondary street address. string X
city The store's city. string X
state The store's state or region. string X
postal_code The store's postal/zip code. string X
country The store's country string
email The email set for the store. This may be different than the associated user's email. string X
phone The phone number set for the store. string X
currency The currency set for this store. string
weight_unit The weight unit set for this store.
Valid values are:
  • lb
  • kg
string

GET
Retrieve Details for a Store

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

Returns all fields for the given store.


scope: read:store-catalog

Example CURL request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/store \
--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 store are returned.

{
    "user_id": "123456",
    "site_id": "987654321",
    "company_name": "Healthy Food For You",
    "street": "460 Bryant St.",
    "street2": null,
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94107",
    "country": "US",
    "email": "hf4u@email.com",
    "phone": 5555555555,
    "currency": "USD",
    "weight_unit": "lb"
}

PATCH
Update a Store

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

Updates the given store.


scope: write:store-catalog

These fields can be updated:

Name Description Type
company_name The name given to the store. string
street The store's street address. string
street2 Secondary street address. string
city The store's city. string
state The store's state or region. string
postal_code The store's postal/zip code. string
email The email set for the store. This may be different than the associated user's email. string
phone The phone number set for the store. string

Example CURL request:

curl --request PATCH \
--url https://api.weebly.com/v1/user/sites/987654321/store \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"
--data '{
            "email": "healthyfood4you@email.com",
            "phone": 5551234567,
        }'

Example response:

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

{
    "user_id": "123456",
    "site_id": "987654321",
    "company_name": "Healthy Food For You",
    "street": "460 Bryant St.",
    "street2": null,
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94107",
    "country": "US",
    "email": "healthyfood4you@email.com",
    "phone": 5551234567,
    "currency": "USD",
    "weight_unit": "lb"
}

Help make these docs better!









Tags: