Support

Commerce API scopes

View as Markdown

PAT scopes for the GoDaddy Commerce APIs, and the endpoints each scope unlocks.

Commerce APIs use PAT scopes to authorize requests.

Scopes follow the pattern commerce.<resource>:<action>.

To use these scopes, generate a PAT with Commerce scopes on the Personal Access Token page. Go to How to Authenticate for PAT setup.

Permission values

The :<permission> suffix on a scope maps to the HTTP methods it unlocks:

PermissionUse forHTTP methods
readRead-only accessGET
writeCreate and update combinedPOST, PATCH, PUT
createCreate only (when separate from update)POST
updateUpdate only (when separate from create)PATCH, PUT
deleteDelete accessDELETE
executeOther operations (usually with an operation field)varies
cancelCancel a resourcePOST (GraphQL mutation)
completeComplete a resourcePOST (GraphQL mutation)
archiveArchive a resourcePOST (GraphQL mutation)

Store

ScopeGrantsEndpoints
commerce.store:readRead store informationGET /v1/commerce/stores/{storeId}
GET /v1/commerce/stores/{storeId}/attributes/{attrName}

Channel

ScopeGrantsEndpoints
commerce.channel:readRead sales channelsGET /v1/commerce/channels
GET /v1/commerce/channels/{channelId}

Get channel by ID may return 401

GET /v1/commerce/channels/{channelId} checks access on that specific channel. A PAT that can list channels for a store may still receive 401 on get-by-id. List channels and filter instead:

curl -s "https://api.godaddy.com/v1/commerce/channels?registeredStores.storeId=${STORE_ID}" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  | jq '.items[] | select(.channelId == "<CHANNEL_ID>")'

Customer

ScopeGrantsEndpoints
commerce.customer:readRead customersGET /v1/commerce/stores/{storeId}/customers
GET /v1/commerce/stores/{storeId}/customers/{customerId}
commerce.customer:createCreate customersPOST /v1/commerce/stores/{storeId}/customers
commerce.customer:updateUpdate customer informationPATCH /v1/commerce/stores/{storeId}/customers/{customerId}

Product (Catalog GraphQL)

ScopeGrantsEndpoint
commerce.product:readRead productsPOST /v2/commerce/stores/{storeId}/catalog-subgraph
commerce.product:writeCreate and update productsPOST /v2/commerce/stores/{storeId}/catalog-subgraph

Order (Order GraphQL)

ScopeGrantsEndpoint
commerce.order:readRead ordersPOST /v1/commerce/order-subgraph
commerce.order:createCreate ordersPOST /v1/commerce/order-subgraph
commerce.order:updateUpdate ordersPOST /v1/commerce/order-subgraph
commerce.order:cancelCancel ordersPOST /v1/commerce/order-subgraph
commerce.order:completeComplete ordersPOST /v1/commerce/order-subgraph

Tax (Tax GraphQL)

ScopeGrantsEndpoint
commerce.tax:readRead taxes and ratesPOST /v2/commerce/stores/{storeId}/tax-subgraph
commerce.tax:createCreate taxes and ratesPOST /v2/commerce/stores/{storeId}/tax-subgraph
commerce.tax:writeUpdate taxes and ratesPOST /v2/commerce/stores/{storeId}/tax-subgraph
commerce.tax:deleteDelete taxes and ratesPOST /v2/commerce/stores/{storeId}/tax-subgraph

Transaction

ScopeGrantsEndpoints
commerce.transaction:readRead transactionsGET /v2/commerce/stores/{storeId}/transactions
GET /v2/commerce/stores/{storeId}/transactions/{transactionId}

Last updated on

How is this guide?