Get rooftop details

Returns the rooftop's stored profile and its admin contact.

GEThttps://api.spyne.ai/user-management/v1/team/get-team-details
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous. Database reads only.

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

Requiredalways send
Request checklist
  1. Send Authorization: Bearer YOUR_TOKEN.
  2. Pass team_id as a query parameter (snake_case).
ParameterTypeRequiredDescription
Query parameters——Sent in the query string.
team_idstringRequiredThe rooftop ID (<teamId>).
Headers——Sent as HTTP headers.
AuthorizationstringRequiredBearer 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

ParameterTypeDescription
data.team.teamIdstringRooftop ID.
data.team.teamNamestringRooftop name.
data.team.websiteLinkstring or nullRooftop website. If several are stored, only the first is returned.
data.team.websiteListingUrlstring or nullInventory listing page URL.
data.team.teamType / teamSubTypestring or nullAccount type and sub-type.
data.team.enterpriseIdstringDealer group ID.
data.team.addressobject or nullAddress 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.geoCoordinatesobject or null{lat, lng}.
data.team.timeZonestring or nullIANA timezone.
data.team.regionTypestring or nullRegion code.
data.user.userId, userName, emailId, contactNo, isdCodestringThe rooftop admin. Empty object if no admin was found.

Errors

StatusReasonWhen it happens
400Invalid inputteam_id is missing or empty.
401ERROR_AUTH_401Missing, malformed or invalid bearer token.
404Team not foundNo rooftop with that ID.
500ERROR_SERVER_500Unexpected 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.


Did this page help you?