Get contract product lines
Get the product lines a rooftop is onboarding, and whether the signed-in user is the reseller owner.
The API checks whether the dealer group belongs to a reseller and, if so, whether the signed-in user is that reseller's enterprise owner. It then returns the product lines in the Onboarding stage, at rooftop level and, for a dealer group with more than one rooftop, at group level. Product lines count only when their onboarding date is after 2026-02-09 19:00. Nothing is written.
Before you call it
- Send
Authorization: Bearer YOUR_TOKEN, the signed-in console user's session token. - You need
enterpriseIdandteamId. isResellerOwneris computed for the user in the token. A user whose default dealer group is the dealer group in the request is never the reseller owner.- The call is synchronous. It reads the dealer group, rooftops, product lines and the product registry. Rate limit: not documented.
Query parameters
- Authenticate: send
Authorization: Bearer YOUR_TOKEN. - Identify the rooftop: pass
enterpriseIdandteamIdas query parameters. - Check access: read
data.isResellerOwnerto decide whether a reseller user may open the checklist. The other fields describe onboarding product lines.
| Parameter | Type | Required | Description |
|---|---|---|---|
enterpriseId | string | Required | Dealer group ID. |
teamId | string | Required | Rooftop ID. |
Sample request
curl -X GET "https://api.spyne.ai/user-management/v1/team-onboarding/get-contract-product-lines?enterpriseId=<enterpriseId>&teamId=<teamId>" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
resp = requests.get(
"https://api.spyne.ai/user-management/v1/team-onboarding/get-contract-product-lines",
params={"enterpriseId": "<enterpriseId>", "teamId": "<teamId>"},
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(resp.json()["data"]["isResellerOwner"])const params = new URLSearchParams({ enterpriseId: "<enterpriseId>", teamId: "<teamId>" });
const res = await fetch(
`https://api.spyne.ai/user-management/v1/team-onboarding/get-contract-product-lines?${params}`,
{ headers: { Authorization: "Bearer YOUR_TOKEN" } }
);
const { data } = await res.json();Sample response
{
"message": "",
"error": false,
"code": "",
"details": null,
"data": {
"isOnboarding": true,
"groupDealer": { "enabled": false, "contractData": [] },
"individualDealer": {
"enabled": true,
"contractData": [
{
"productLineDisplayName": "Conversational AI",
"displayProductNames": ["Sales Inbound", "Service Inbound"],
"productLineId": "<productLineId>"
}
]
},
"isResellerOwner": false
}
}{
"message": "Invalid Token",
"error": true,
"code": "ERROR_AUTH_401",
"details": "",
"data": null
}{
"message": "An unexpected error occurred while fetching contract product lines",
"error": true,
"code": "",
"details": null,
"data": null
}Response parameters (200)
| Parameter | Type | Description |
|---|---|---|
data.isOnboarding | boolean | true when at least one product line in the Onboarding stage was found. |
data.groupDealer.enabled | boolean | true for a multi-rooftop dealer group that has group-level onboarding product lines other than Conversational AI. |
data.groupDealer.contractData | array | Group-level product lines. Entries have productLineDisplayName and displayProductNames, with no productLineId. |
data.individualDealer.enabled | boolean | true when this rooftop has onboarding product lines. |
data.individualDealer.contractData | array | Rooftop-level product lines. |
data.individualDealer.contractData[].productLineDisplayName | string | Product line display name. |
data.individualDealer.contractData[].displayProductNames | string[] | Display names of the active products on the line. |
data.individualDealer.contractData[].productLineId | string | The rooftop's product line ID. |
data.isResellerOwner | boolean | true when the dealer group belongs to a reseller and the signed-in user is that reseller's enterprise owner for this dealer group or rooftop. |
When the dealer group has no rooftops, or has several rooftops and none is in Contracted, Onboarding or Live, the response has the default values: everything false and empty, except isResellerOwner, which is still computed.
Errors
| Status | Code | When it happens |
|---|---|---|
400 | Missing parameter | enterpriseId or teamId is missing. The framework rejects the request and sets the body. |
401 | ERROR_AUTH_401 | Missing, malformed or invalid token. |
500 | Unexpected error | Any failure in the lookups, including the product registry call. |
What happens next
If the user is a reseller user, allow the checklist only when isResellerOwner is true. Then call List active Vini products.
This call comes after Get contracting data.
Updated about 1 hour ago
