Skip to main content

List Stores

List every store your API token can act on: your own store plus any store whose team granted you API access.

Use each store's id as the X-Easycart-Store header value to direct requests at that store — see Store selection.

This endpoint is scoped to your user account, not to a store. It ignores the X-Easycart-Store header and never returns 403, so it works even when your default store has not granted you API access.

Request

GET /stores

Example Request

curl -X GET "https://cart.easy.tools/api/v1/stores" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

{
"stores": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Store",
"slug": "acme-store",
"role": "owner",
"is_default": true
},
{
"id": "661f9511-f3aa-52e5-b827-557766551111",
"name": "Partner Boutique",
"slug": "partner-boutique",
"role": "member",
"is_default": false
}
]
}

The list is empty when the token currently reaches no store (for example, after every grant was revoked):

{
"stores": []
}

Response Fields

FieldTypeNullableDescription
storesarrayNoStores where your account has API access. May be empty.
stores[].idstringNoStore identifier (UUID). Pass it as the X-Easycart-Store header to direct requests at this store. Matches store.id from Get store.
stores[].namestringNoStore display name. When the store has no friendly name set, this is the store's contact email instead.
stores[].slugstringNoURL-friendly store identifier
stores[].rolestringNoowner — you own this store; member — you have API access as a team member
stores[].is_defaultbooleanNoWhether a request without the X-Easycart-Store header targets this store. At most one store is the default; the list can have none.

Error Responses

Unauthorized (401)

{
"message": "Unauthenticated."
}