Get rooftop details
Returns the rooftop's stored profile and its admin contact.
Reads the rooftop record: name, website, website listing URL, account type and sub-type, address, coordinates, timezone and region. It also returns one admin user for the rooftop. That user is the first user on the rooftop who is a rooftop admin or the dealer group owner. If the rooftop has no users of its own, the dealer group's users are checked instead. If no admin is found, user is an empty object. Nothing is written.
Before you call it
-
You need the rooftop's
teamId. -
Authentication: Bearer token of a signed-in console user. The token is checked; the route does not check that the caller belongs to the rooftop.
-
Rate limit: Not documented
-
Processing: Synchronous. Database reads only.
Request
- Send
Authorization: Bearer YOUR_TOKEN. - Pass
team_idas a query parameter (snake_case).
| Parameter | Type | Required | Description |
|---|---|---|---|
| Query parameters | — | — | Sent in the query string. |
team_id | string | Required | The rooftop ID (<teamId>). |
| Headers | — | — | Sent as HTTP headers. |
Authorization | string | Required | Bearer YOUR_TOKEN |
Sample request
curl -X GET "https://api.spyne.ai/user-management/v1/team/get-team-details?team_id=<teamId>" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
res = requests.get(
"https://api.spyne.ai/user-management/v1/team/get-team-details",
params={"team_id": "<teamId>"},
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(res.status_code, res.json())const res = await fetch(
"https://api.spyne.ai/user-management/v1/team/get-team-details?team_id=<teamId>",
{ headers: { Authorization: "Bearer YOUR_TOKEN" } }
);
console.log(res.status, await res.json());Sample response
{
"message": "",
"error": false,
"code": "",
"details": null,
"data": {
"team": {
"teamId": "<teamId>",
"teamName": "Example Motors",
"websiteLink": "https://www.example.com",
"websiteListingUrl": "https://www.example.com/used-inventory",
"teamType": "<accountType>",
"teamSubType": "<accountSubType>",
"enterpriseId": "<enterpriseId>",
"address": {
"addressLine1": "100 Example Ave",
"addressLine2": "",
"city": "Austin",
"state": "TX",
"district": "",
"country": "United States",
"zipcode": "78701",
"address_line": "100 Example Ave",
"pin_code": "78701"
},
"geoCoordinates": { "lat": 30.2672, "lng": -97.7431 },
"timeZone": "America/Chicago",
"regionType": "AMER"
},
"user": {
"userId": "<userId>",
"userName": "Jane Doe",
"emailId": "[email protected]",
"contactNo": "5550100000",
"isdCode": "+1"
}
}
}{ "message": "Invalid Token", "error": true, "code": "ERROR_AUTH_401", "details": "", "data": null }{ "message": "Team not found", "error": true, "code": "ERROR_NOT_FOUND_404", "details": null, "data": null }{ "message": "General API error. Please try again later.", "error": true, "code": "ERROR_SERVER_500", "details": { "name": "Error", "message": "..." } }200 OK. If the rooftop has no users at all, message is "Team found but no users associated" and user is {}.
400 Bad Request (team_id missing). The response body is the framework's default input-validation error. Its shape is not defined in the code.
Response fields
| Parameter | Type | Description |
|---|---|---|
data.team.teamId | string | Rooftop ID. |
data.team.teamName | string | Rooftop name. |
data.team.websiteLink | string or null | Rooftop website. If several are stored, only the first is returned. |
data.team.websiteListingUrl | string or null | Inventory listing page URL. |
data.team.teamType / teamSubType | string or null | Account type and sub-type. |
data.team.enterpriseId | string | Dealer group ID. |
data.team.address | object or null | Address as saved by Save rooftop details. Saved addresses carry addressLine1, addressLine2, city, state, district, country and zipcode, plus the copies address_line and pin_code. |
data.team.geoCoordinates | object or null | {lat, lng}. |
data.team.timeZone | string or null | IANA timezone. |
data.team.regionType | string or null | Region code. |
data.user.userId, userName, emailId, contactNo, isdCode | string | The rooftop admin. Empty object if no admin was found. |
Errors
| Status | Reason | When it happens |
|---|---|---|
400 | Invalid input | team_id is missing or empty. |
401 | ERROR_AUTH_401 | Missing, malformed or invalid bearer token. |
404 | Team not found | No rooftop with that ID. |
500 | ERROR_SERVER_500 | Unexpected database error. |
Next
Pre-fill the rooftop form with team and user. Fill the vehicle-type checkboxes from Get vehicle types and department addresses. Then save with Save rooftop details. The brand registration form also calls this endpoint, to read team.websiteLink.
- Called before: none in this task.
- Called after: Get vehicle types and department addresses, Save rooftop details.
Updated about 1 hour ago
