Retrieve Rooftop List
Returns one rooftop (team) with its product lines and stages, plus its dealer id and name. Send enterprise_id instead to get every rooftop of that dealer.
GET
AuthBearer token
Query parameters
- team_id (string, optional): the rooftop to fetch.
- enterprise_id (string, optional): the dealer whose rooftops to list.
Send at least one. If you send both, team_id is used and only that rooftop is returned.
Sample request
curl --request GET \
--url 'https://api.spyne.ai/api/pv1/enterprise/get-team?team_id=<team_id>' \
--header 'Authorization: Bearer YOUR_API_KEY'curl --request GET \
--url 'https://api.spyne.ai/api/pv1/enterprise/get-team?enterprise_id=<enterprise_id>' \
--header 'Authorization: Bearer YOUR_API_KEY'Sample response
{
"data": {
"teamId": "<team_id>",
"teamName": "Main Rooftop",
"productLines": [
{ "productLineName": "studioAi", "products": [ { "name": "image", "stage": "Onboarding" } ] }
],
"enterpriseId": "<enterprise_id>",
"enterpriseName": "Acme Motors"
}
}{
"data": [
{
"teamId": "<team_id_1>",
"teamName": "Main Rooftop",
"productLines": [
{ "productLineName": "studioAi", "products": [ { "name": "image", "stage": "Onboarding" } ] }
],
"enterpriseId": "<enterprise_id>",
"enterpriseName": "Acme Motors"
},
{
"teamId": "<team_id_2>",
"teamName": "Second Rooftop",
"productLines": [
{ "productLineName": "conversationalAi", "products": [ { "name": "inboundSales", "stage": "Onboarding" } ] }
],
"enterpriseId": "<enterprise_id>",
"enterpriseName": "Acme Motors"
}
],
"total": 2
}Response parameters
| Parameter | Type | Description |
|---|---|---|
| data.teamId | string | The rooftop's id. |
| data.teamName | string | Rooftop name. |
| data.productLines | array | Product lines enabled, each with its products and stages. |
| data.enterpriseId | string | The parent dealer's id. |
| data.enterpriseName | string | Parent dealer name. |
With enterprise_id only, data is an array of these rooftop objects and total is the number of rooftops.
Errors
| Status code | Description |
|---|---|
| 400 | Neither team_id nor enterprise_id was sent, or no partner account is mapped to your token's enterprise. |
| 401 | Missing or invalid token. |
| 404 | No rooftop or dealer under your partner account matches the given id. |
| 500 | Unexpected server error. |
Updated 2 days ago
Did this page help you?
