Retrieve Dealer List

Returns one dealer (enterprise) with its rooftops and per-product stages. Leave out enterprise_id to get every dealer under your partner account. Your partner account is identified from your token.

GEThttps://api.spyne.ai/api/pv1/enterprise/get-enterprises
AuthBearer token

Query parameters

  • enterprise_id (string, optional): the dealer to fetch. Leave it out to list all dealers under your partner account.

Sample request

curl --request GET \
  --url 'https://api.spyne.ai/api/pv1/enterprise/get-enterprises?enterprise_id=<enterprise_id>' \
  --header 'Authorization: Bearer YOUR_API_KEY'
curl --request GET \
  --url 'https://api.spyne.ai/api/pv1/enterprise/get-enterprises' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Sample response

{
  "data": {
    "enterpriseId": "<enterprise_id>",
    "enterpriseName": "Acme Motors",
    "accountType": "INDIVIDUAL_DEALER",
    "teams": [
      { "teamId": "<team_id>", "teamName": "Main Rooftop", "productLines": [ { "productLineName": "studioAi", "products": [ { "name": "image", "stage": "Onboarding" } ] } ] }
    ]
  }
}
{
  "data": [
    {
      "enterpriseId": "<enterprise_id>",
      "enterpriseName": "Acme Motors",
      "accountType": "INDIVIDUAL_DEALER",
      "teams": [ ... ]
    }
  ],
  "total": 1
}

Response parameters

ParameterTypeDescription
data.enterpriseIdstringThe dealer's id.
data.enterpriseNamestringDealer name.
data.accountTypestringINDIVIDUAL_DEALER or DEALER_GROUP.
data.teamsarrayRooftops under this dealer, each with teamId, teamName and productLines.

Without enterprise_id, data is an array of these dealer objects and total is the number of dealers.

Errors

Status codeDescription
400No partner account is mapped to your token's enterprise.
401Missing or invalid token.
404No dealer under your partner account matches the given enterprise_id.
500Unexpected server error.

Did this page help you?