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.
GET
AuthBearer token
Prefer ReadMe's own explorer? Open it here.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
enterprise_id | string | Required | The enterprise to list inventory for. |
team_id | string | Required | The team (rooftop) to list inventory for. Must belong to the enterprise, or the request is rejected with 400. |
page | integer | Required | 1-based page number. |
per_page | integer | Required | Number of records per page. |
sort_by | string | Optional | Sort order, as {"creation_epoch": "asc"} or {"creation_epoch": "desc"}. "Note": creation_epoch is the only supported sort key. |
created_at | string | Optional | Creation-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_at | string | Optional | Update-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_sold | boolean | Optional | Restrict 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)
| Field | Type | Description |
|---|---|---|
allVinsCount | integer | Vehicles matching the filters. Example: 412. |
enterpriseTeamVinsCount | integer | Vehicles 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. |
usedVinsCount | integer | Example: 300. |
newVinsCount | integer | Example: 112. |
isClonedCount | integer | Example: 4. |
totalVinsCount | integer | Example: 412. |
totalGroupsCount | integer | Always 0 on this endpoint; grouping is not exposed here. Example: 0. |
prioritizeRegistration | boolean | True when the dealer's country displays registration numbers in place of VINs. Example: false. |
vinResp | object[] | |
vinResp[].document | object | A 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.id | string | Example: dv_7731ab. |
vinResp[].document.dealerVinId | string | Example: fe89aa8d-5419-41f0-99bb-1e6e45691dcb. |
vinResp[].document.vin | string | Example: 1HGCM82633A004352. |
vinResp[].document.stock | string | Example: STK-4471. |
vinResp[].document.year | integer | Example: 2020. |
vinResp[].document.make | string | Example: Honda. |
vinResp[].document.model | string | Example: Accord. |
vinResp[].document.trim | string | Example: EX-L. |
vinResp[].document.price | integer | Example: 24995. |
vinResp[].document.currency | string | Example: USD. |
vinResp[].document.currencySign | string | Example: $. |
vinResp[].document.car_type | string | Example: Sedan. |
vinResp[].document.car_ownership | string | Example: used. |
vinResp[].document.fuel_type | string | Example: Petrol. |
vinResp[].document.transmission_type | string | Example: Automatic. |
vinResp[].document.exterior_colour | string[] | |
vinResp[].document.interior_colour | string[] | |
vinResp[].document.odometer | object | |
vinResp[].document.odometer.value | integer | Example: 41230. |
vinResp[].document.odometer.unit | string | Example: miles. |
vinResp[].document.sold | boolean | Example: false. |
vinResp[].document.image_count | integer | Example: 24. |
vinResp[].document.is360 | boolean | Example: true. |
vinResp[].document.isVideo | integer | Example: 1. |
vinResp[].document.imagesStatus | string | Example: COMPLETED. |
vinResp[].document.threeSixtyStatus | string | Example: COMPLETED. |
vinResp[].document.videoStatus | string | Example: COMPLETED. |
vinResp[].document.thumbnail_output_url | string | Example: https://cdn.example.com/thumb.jpg. |
vinResp[].document.creationEpoch | integer | Example: 1767225600000. |
vinResp[].document.updated_at | string | Example: 2026-02-14T09:12:00Z. |
vinResp[].document.lead_count | integer | Example: 3. |
vinResp[].document.views | integer | Example: 128. |
vinResp[].document.enterprise_id | string | Example: 9aeac0639e. |
vinResp[].document.team_id | string | Example: 86fc402add. |
vinResp[].document.vinTags | object[] | 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[].tag | string | Example: Recon Hold. |
vinResp[].document.vinTags[].createdAt | string | Example: 2026-08-19T09:14:22.000Z. |
vinResp[].highlight | string | Search highlight fragments, when the query matched. |
vinResp[].highlights | string[] |
Errors
| Status | Meaning | When it happens |
|---|---|---|
400 | Bad Request | A required parameter is missing, a JSON filter is malformed, or the enterprise/team pair is invalid. |
401 | Unauthorized | Missing or invalid credential. Emitted by the auth layer, and shaped differently to the other errors. |
500 | Internal Server Error | Unexpected error, or the inventory service was unreachable. |
Updated 2 days ago
Did this page help you?
