How to manage a store
View as MarkdownFind your store ID and read store configuration — required starting points for all Commerce API calls.
Overview
Every Commerce API call is scoped to a store. Your store ID (storeId) is a UUID you copy from the platform and pass in the path for every subsequent request. This page covers reading store configuration once you have a storeId.
Prerequisites
The following prerequisites are required before you can manage a store:
- a GoDaddy Payments account with an active store
Create a GoDaddy Payments account
Go to Set up a GoDaddy Payments account to create your account and activate your store.
- a Personal Access Token (PAT) with the
commerce.store:readscope - your
storeIdFind your store ID
Sign in to your GoDaddy account and go to About the Commerce API to retrieve your
storeId.
Get store by ID
GET /v1/commerce/stores/{storeId} retrieves the configuration for a specific store.
The following procedure reads the details of a store by ID.
-
Retrieve the details of a store by its
id:curl -s "https://api.godaddy.com/v1/commerce/stores/${STORE_ID}" \ -H "Authorization: Bearer $GODADDY_PAT" -
Review the response including the store ID, name, status, currency, and address:
{ "id": "<STORE_UUID>", "name": "<STORE_DISPLAY_NAME>", "status": "<LIFECYCLE_STATUS>", "currency": "<ISO_4217_CURRENCY_CODE>", "timezone": "<IANA_TIMEZONE>", "address": { "line1": "<STREET_ADDRESS>", "city": "<CITY_NAME>", "state": "<STATE_OR_PROVINCE_CODE>", "postalCode": "<POSTAL_OR_ZIP_CODE>", "country": "<ISO_3166_COUNTRY_CODE>" }, "createdAt": "<ISO8601_CREATED_TIMESTAMP>", "updatedAt": "<ISO8601_UPDATED_TIMESTAMP>" }
Get store attribute
GET /v1/commerce/stores/{storeId}/attributes/{attrName} retrieves a single configuration attribute for a store.
The following procedure reads one attribute by name.
-
Retrieve a single attribute by name:
ATTR_NAME="<STORE_ATTRIBUTE_NAME>" curl -s "https://api.godaddy.com/v1/commerce/stores/${STORE_ID}/attributes/${ATTR_NAME}" \ -H "Authorization: Bearer $GODADDY_PAT" -
Review the response returning the attribute name and its current value:
{ "name": "<STORE_ATTRIBUTE_NAME>", "value": "<STORE_ATTRIBUTE_VALUE>" }
Common errors
The following table lists common errors when reading store configuration and their most likely causes:
| Status | Most likely cause |
|---|---|
401 | PAT is missing or expired. Go to Authentication to generate a new token. |
403 | Token doesn't include the commerce.store:read scope. |
404 | Store ID doesn't exist or isn't accessible with the provided token. |
429 | Rate limit exceeded. Honor the Retry-After header before retrying. |
Agent & Automation Notes
commerce.store:readRelated
API References
Guides
Last updated on
How is this guide?