Retrieve Inventory

Returns a paginated list of vehicles for an enterprise and team, drawn from the inventory search index.

sort_by, created_at and updated_at are JSON objects passed as query parameters — send them URL-encoded, for example sort_by={"creation_epoch":"desc"}.

The response body is returned exactly as the inventory service produces it.

GEThttps://api.spyne.ai/api/pv1/enterprise/v2
AuthBearer token

Prefer ReadMe's own explorer? Open it here.

Query parameters

ParameterTypeRequiredDescription
enterprise_idstringRequiredThe enterprise to list inventory for.
team_idstringRequiredThe team (rooftop) to list inventory for. Must belong to the enterprise, or the request is rejected with 400.
pageintegerRequired1-based page number.
per_pageintegerRequiredNumber of records per page.
sort_bystringOptionalSort order, as {"creation_epoch": "asc"} or {"creation_epoch": "desc"}. "Note": creation_epoch is the only supported sort key.
created_atstringOptionalCreation-date window, as {"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}. Both keys are required when this parameter is used. "Note": there is a known issue where the two bounds are applied in reverse, so a normal from ≤ to window currently matches nothing. Track this before relying on the filter.
updated_atstringOptionalUpdate-date window, as {"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}. Both keys are required when supplied. "Note": there is a known issue where the two bounds are applied in reverse, so a normal from ≤ to window currently matches nothing. Track this before relying on the filter.
is_soldbooleanOptionalRestrict the list to sold (true) or unsold (false) vehicles. Omit to include both.

Sample request

curl --request GET \
  --url 'https://api.spyne.ai/api/pv1/enterprise/v2?enterprise_id=<enterprise_id>&team_id=<team_id>&page=1&per_page=20' \
  --header 'Authorization: Bearer YOUR_API_KEY'
import requests

url = "https://api.spyne.ai/api/pv1/enterprise/v2"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
    "enterprise_id": "<enterprise_id>",
    "team_id": "<team_id>",
    "page": 1,
    "per_page": 20
}

response = requests.get(url, headers=headers, params=params)
print(response.status_code, response.json())
const url = new URL("https://api.spyne.ai/api/pv1/enterprise/v2");
url.searchParams.set("enterprise_id", "<enterprise_id>");
url.searchParams.set("team_id", "<team_id>");
url.searchParams.set("page", "1");
url.searchParams.set("per_page", "20");

const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});
console.log(response.status, await response.json());

Sample response

{
  "allVinsCount": 412,
  "enterpriseTeamVinsCount": 95,
  "usedVinsCount": 300,
  "newVinsCount": 112,
  "isClonedCount": 4,
  "totalVinsCount": 412,
  "totalGroupsCount": 0,
  "prioritizeRegistration": false,
  "vinResp": [
    {
      "document": {
        "id": "dv_7731ab",
        "dealerVinId": "fe89aa8d-5419-41f0-99bb-1e6e45691dcb",
        "vin": "1HGCM82633A004352",
        "stock": "STK-4471",
        "year": 2020,
        "make": "Honda",
        "model": "Accord",
        "trim": "EX-L",
        "price": 24995,
        "currency": "USD",
        "currencySign": "$",
        "sold": false,
        "image_count": 24,
        "is360": true,
        "imagesStatus": "COMPLETED",
        "creationEpoch": 1767225600000,
        "enterprise_id": "9aeac0639e",
        "team_id": "86fc402add"
      },
      "highlight": {},
      "highlights": []
    }
  ]
}
{
  "message": "page and per_page are required"
}
{
  "message": "sort_by.creation_epoch is required and must be \"asc\" or \"desc\""
}
{
  "message": "created_at must have both \"to\" and \"from\" fields"
}
{
  "message": "updated_at must have both \"to\" and \"from\" fields"
}
{
  "message": "Invalid enterprise or team ID."
}
{
  "status": "401",
  "message": "Invalid Auth key"
}
{
  "message": "Internal server error"
}

Response parameters (200)

FieldTypeDescription
allVinsCountintegerVehicles matching the filters. Example: 412.
enterpriseTeamVinsCountintegerVehicles for this enterprise and team within the date window — the supplied created_at window, or a rolling last 30 days when none is given. Example: 95.
usedVinsCountintegerExample: 300.
newVinsCountintegerExample: 112.
isClonedCountintegerExample: 4.
totalVinsCountintegerExample: 412.
totalGroupsCountintegerAlways 0 on this endpoint; grouping is not exposed here. Example: 0.
prioritizeRegistrationbooleanTrue when the dealer's country displays registration numbers in place of VINs. Example: false.
vinRespobject[]
vinResp[].documentobjectA vehicle record as held in the inventory search index. The fields below are the most commonly used; additional index fields may be present.
vinResp[].document.idstringExample: dv_7731ab.
vinResp[].document.dealerVinIdstringExample: fe89aa8d-5419-41f0-99bb-1e6e45691dcb.
vinResp[].document.vinstringExample: 1HGCM82633A004352.
vinResp[].document.stockstringExample: STK-4471.
vinResp[].document.yearintegerExample: 2020.
vinResp[].document.makestringExample: Honda.
vinResp[].document.modelstringExample: Accord.
vinResp[].document.trimstringExample: EX-L.
vinResp[].document.priceintegerExample: 24995.
vinResp[].document.currencystringExample: USD.
vinResp[].document.currencySignstringExample: $.
vinResp[].document.car_typestringExample: Sedan.
vinResp[].document.car_ownershipstringExample: used.
vinResp[].document.fuel_typestringExample: Petrol.
vinResp[].document.transmission_typestringExample: Automatic.
vinResp[].document.exterior_colourstring[]
vinResp[].document.interior_colourstring[]
vinResp[].document.odometerobject
vinResp[].document.odometer.valueintegerExample: 41230.
vinResp[].document.odometer.unitstringExample: miles.
vinResp[].document.soldbooleanExample: false.
vinResp[].document.image_countintegerExample: 24.
vinResp[].document.is360booleanExample: true.
vinResp[].document.isVideointegerExample: 1.
vinResp[].document.imagesStatusstringExample: COMPLETED.
vinResp[].document.threeSixtyStatusstringExample: COMPLETED.
vinResp[].document.videoStatusstringExample: COMPLETED.
vinResp[].document.thumbnail_output_urlstringExample: https://cdn.example.com/thumb.jpg.
vinResp[].document.creationEpochintegerExample: 1767225600000.
vinResp[].document.updated_atstringExample: 2026-02-14T09:12:00Z.
vinResp[].document.lead_countintegerExample: 3.
vinResp[].document.viewsintegerExample: 128.
vinResp[].document.enterprise_idstringExample: 9aeac0639e.
vinResp[].document.team_idstringExample: 86fc402add.
vinResp[].document.vinTagsobject[]Active labels applied to the vehicle. Omitted entirely when the vehicle has none. Tags of every type are flattened into a single list, so the tag type is not carried in the response.
vinResp[].document.vinTags[].tagstringExample: Recon Hold.
vinResp[].document.vinTags[].createdAtstringExample: 2026-08-19T09:14:22.000Z.
vinResp[].highlightstringSearch highlight fragments, when the query matched.
vinResp[].highlightsstring[]

Errors

StatusMeaningWhen it happens
400Bad RequestA required parameter is missing, a JSON filter is malformed, or the enterprise/team pair is invalid.
401UnauthorizedMissing or invalid credential. Emitted by the auth layer, and shaped differently to the other errors.
500Internal Server ErrorUnexpected error, or the inventory service was unreachable.

Did this page help you?