Read a saved integration

Read the integration saved for one rooftop and one entity, or get an empty object when nothing is saved.

GEThttps://api.spyne.ai/central-config/v1/integration
AuthNone (route has no auth check)Rate limitNot documentedProcessingOne database read, plus outbound reads for CRM and scheduler fallbacks.

The lookup key is enterpriseId + teamId + domain + entity. If there is no saved record:

  • for CRM, it builds a read-only answer from the rooftop's registered CRM link, if one exists;
  • for SERVICE_SCHEDULER, it builds a read-only answer from the registered scheduler link and the service agent's settings;
  • for every other entity, including CAR_HISTORY, IMS and DMS, it returns an empty object.

A built answer is not saved and has no _id. This endpoint does not return a partner list.

Before you call it

  • There is no authentication check on this route.
  • enterpriseId (dealer group) and teamId (rooftop) come from the onboarding session.
  • entity is matched with exact casing. Use CRM, CAR_HISTORY or SERVICE_SCHEDULER. A lowercase value finds no saved record.
  • The inventory feed page does not use this endpoint. It reads workflows with List inventory feed workflows.
  • One database read, plus outbound reads for the CRM and service scheduler fallbacks. Rate limit: not documented.

Query parameters

Requiredalways send
ParameterTypeRequiredDescription
enterpriseIdstringRequired<enterpriseId> of the dealer group.
teamIdstringRequired<teamId> of the rooftop.
domainstringRequiredintegration.
entitystringRequiredCRM, CAR_HISTORY or SERVICE_SCHEDULER (exact casing).
Request checklist
  1. Send all four: pass every query parameter.
  2. Check for a record: treat data with no entityconfig as not configured.
  3. Decide if it is done: the UI treats the integration as done when CRM has entityconfig.api.partnerName; service scheduler has entityconfig.api.partnerId or partnerName; vehicle history has entityconfig.partnerId or partnerName.

Sample request

curl -X GET "https://api.spyne.ai/central-config/v1/integration?enterpriseId=<enterpriseId>&teamId=<teamId>&domain=integration&entity=CRM"
import requests

res = requests.get(
    "https://api.spyne.ai/central-config/v1/integration",
    params={
        "enterpriseId": "<enterpriseId>",
        "teamId": "<teamId>",
        "domain": "integration",
        "entity": "SERVICE_SCHEDULER",
    },
)
config = res.json()["data"]
const qs = new URLSearchParams({
  enterpriseId: "<enterpriseId>",
  teamId: "<teamId>",
  domain: "integration",
  entity: "CAR_HISTORY",
});
const res = await fetch(`https://api.spyne.ai/central-config/v1/integration?${qs}`);
const { data } = await res.json();

Sample response

{
  "success": true,
  "message": "Integration configuration retrieved successfully",
  "data": {
    "_id": "<configId>",
    "enterpriseId": "<enterpriseId>",
    "teamId": "<teamId>",
    "enterpriseName": "Example Motors Group",
    "teamName": "Example Motors",
    "userId": "<userId>",
    "domain": "integration",
    "type": "single",
    "entity": "CRM",
    "entityconfig": {
      "api": {
        "partnerId": "<partnerId>",
        "partnerName": "examplecrm",
        "dealerId": "<dealerId>",
        "logo": "https://example.com/logo.png",
        "approved": false
      },
      "partnerProviderTypes": ["CRM"],
      "app": false,
      "console": false
    },
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
}
{ "success": true, "message": "Integration config not found", "data": {} }
{
  "success": false,
  "message": "Missing required query parameters",
  "error": "enterpriseId, teamId, domain, and entity are required query parameters"
}
{ "success": false, "message": "Failed to fetch integration configuration", "error": "<error message>" }

Response parameters

ParameterTypeDescription
successbooleantrue on 200.
messagestringIntegration configuration retrieved successfully or Integration config not found.
dataobjectThe saved record, a built fallback, or an empty object.
data._idstringPresent only for a saved record.
data.enterpriseId, data.teamIdstringDealer group and rooftop.
data.enterpriseName, data.teamNamestringNames sent at save time.
data.userIdstringUser who last saved it.
data.domainstringintegration.
data.typestringsingle.
data.entitystringCRM, CAR_HISTORY or SERVICE_SCHEDULER.
data.entityconfigobjectWhat was saved. The shape per entity is on Save an integration.
data.entityconfig.api.username, data.entityconfig.api.passwordstringSERVICE_SCHEDULER only, present when they were saved. Credential field returned by the API. Never log or display it.
data.createdAt, data.updatedAtstringTimestamps.

Errors

StatusCodeWhen it happens
400Missing required query parametersAny of the four query parameters is missing.
500Failed to fetch integration configurationDatabase error.

Not found comes back as 200 with an empty data object, not as 404.

What happens next

If the integration is not configured, list partners (CRM and scheduler or inventory and history) and save the integration. If it is configured, show the saved partner and allow edits through the same save.


Did this page help you?