Support
Manage a storeManage a store

How to manage a store

View as Markdown

Find 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:

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.

  1. 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"
  2. 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.

  1. 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"
  2. 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:

StatusMost likely cause
401PAT is missing or expired. Go to Authentication to generate a new token.
403Token doesn't include the commerce.store:read scope.
404Store ID doesn't exist or isn't accessible with the provided token.
429Rate limit exceeded. Honor the Retry-After header before retrying.

Agent & Automation Notes

Scopescommerce.store:read
IdempotentYes
DestructiveNo
On failureSafe to retry on any error. Store reads are idempotent.

Last updated on

How is this guide?

On this page