Get contract product lines

Get the product lines a rooftop is onboarding, and whether the signed-in user is the reseller owner.

GEThttps://api.spyne.ai/user-management/v1/team-onboarding/get-contract-product-lines
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous; reads the dealer group, rooftops, product lines and product registry.

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 enterpriseId and teamId.
  • isResellerOwner is 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

Requiredalways send
Request checklist
  1. Authenticate: send Authorization: Bearer YOUR_TOKEN.
  2. Identify the rooftop: pass enterpriseId and teamId as query parameters.
  3. Check access: read data.isResellerOwner to decide whether a reseller user may open the checklist. The other fields describe onboarding product lines.
ParameterTypeRequiredDescription
enterpriseIdstringRequiredDealer group ID.
teamIdstringRequiredRooftop 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)

ParameterTypeDescription
data.isOnboardingbooleantrue when at least one product line in the Onboarding stage was found.
data.groupDealer.enabledbooleantrue for a multi-rooftop dealer group that has group-level onboarding product lines other than Conversational AI.
data.groupDealer.contractDataarrayGroup-level product lines. Entries have productLineDisplayName and displayProductNames, with no productLineId.
data.individualDealer.enabledbooleantrue when this rooftop has onboarding product lines.
data.individualDealer.contractDataarrayRooftop-level product lines.
data.individualDealer.contractData[].productLineDisplayNamestringProduct line display name.
data.individualDealer.contractData[].displayProductNamesstring[]Display names of the active products on the line.
data.individualDealer.contractData[].productLineIdstringThe rooftop's product line ID.
data.isResellerOwnerbooleantrue 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

StatusCodeWhen it happens
400Missing parameterenterpriseId or teamId is missing. The framework rejects the request and sets the body.
401ERROR_AUTH_401Missing, malformed or invalid token.
500Unexpected errorAny 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.


Did this page help you?