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.
GET
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
| Parameter | Type | Description |
|---|---|---|
| data.enterpriseId | string | The dealer's id. |
| data.enterpriseName | string | Dealer name. |
| data.accountType | string | INDIVIDUAL_DEALER or DEALER_GROUP. |
| data.teams | array | Rooftops 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 code | Description |
|---|---|
| 400 | No partner account is mapped to your token's enterprise. |
| 401 | Missing or invalid token. |
| 404 | No dealer under your partner account matches the given enterprise_id. |
| 500 | Unexpected server error. |
Updated 2 days ago
Did this page help you?
