Skip to main content
GET
/
carts
/
active-domains
Get Active Domains
curl --request GET \
  --url https://api.firmly.work/carts/active-domains \
  --header 'Authorization: Bearer <token>'
{
  "domains": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.firmly.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This endpoint retrieves a list of all domain IDs (store identifiers) that have active cart sessions for the current authenticated device. This is useful for understanding which stores the user has active shopping sessions with.
This endpoint returns only domain names, not full cart data. Use Get Active Carts to retrieve full cart information.

Authentication

Requires Device Authentication.

Request

No request body or query parameters required.

Response

domains
array
Array of domain IDs (store identifiers) that have active sessionsExample: ["staging.luma.gift", "demo.luma.gift", "shop.luma.gift"]

Session Behavior

Active Domain Criteria

  • Domain must have an active cart session
  • Cart must contain at least one item
  • Session must not be expired

Use Cases

  • Quick check for active shopping sessions
  • Pre-flight check before fetching full cart data
  • Building domain-specific UI elements
  • Analytics and session tracking

Errors

Unauthorized

Status Code: 401
Description: Invalid or missing device authentication

Internal Server Error

Status Code: 500
Description: Server error occurred while fetching domains

Examples

curl -X GET 'https://api.firmly.work/api/v2/carts/active-domains' \
  -H 'x-firmly-authorization: <your-auth-token>'

Response Examples

Multiple Active Domains

{
  "domains": [
    "staging.luma.gift",
    "demo.luma.gift",
    "shop.luma.gift"
  ]
}

Single Active Domain

{
  "domains": [
    "staging.luma.gift"
  ]
}

No Active Domains

{
  "domains": []
}