Retrieve a vehicle

Fetch processed media for a vehicle using the dealerVinId from Transform a vehicle. Poll until every requested asset is done, or receive the same payload on your webhook.

Retrieves the processed media and metadata for a vehicle by any one of its identifiers.

Fields with no value are omitted from the response rather than returned as null, so do not rely on a key being present.

GEThttps://api.spyne.ai/api/pv1/merchandise
AuthBearer tokenSame shape asWebhook payload

Prefer ReadMe's own explorer? Open it here.

Before you call it


Query parameters

ParameterTypeRequiredDescription
dealerVinIdstringOptionalSpyne's record identifier, returned by the processing request. When supplied, the other identifiers are ignored.
vinstringOptionalThe vehicle's 17-character alphanumeric VIN.
stockNumberstringOptionalThe dealer's internal inventory identifier.
registrationNumberstringOptionalThe vehicle's official registration number.
teamIdstringOptionalTeam the lookup is scoped to. If omitted, the team from the authenticated API credential is used. "Note": a supplied teamId takes precedence over the credential's team.

Sample request

curl --request GET \
  --url 'https://api.spyne.ai/api/pv1/merchandise' \
  --header 'Authorization: Bearer YOUR_API_KEY'
import requests

url = "https://api.spyne.ai/api/pv1/merchandise"
headers = {"Authorization": "Bearer YOUR_API_KEY"}

response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://api.spyne.ai/api/pv1/merchandise", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});
console.log(response.status, await response.json());

Sample response

{
  "vin": "1HGCM82633A004352",
  "stockNumber": "STK-4471",
  "dealerVinID": "3bd1c257-9b32-4933-8cf4-a445fd5b37b8",
  "source": "API",
  "dealerId": "86fc402add",
  "clientMetaData": {
    "dmsRef": "RO-88213"
  },
  "mediaData": {
    "image": {
      "skuId": "sku_9f2c",
      "aiStatus": "COMPLETED",
      "qcStatus": "APPROVED",
      "imageData": [
        {
          "angle": "front",
          "status": "Done",
          "frameNo": 1,
          "imageId": "img-bbef1ea1",
          "imageName": "0c4fb0ff",
          "inputImage": "https://cdn.example.com/veh/front.jpg",
          "outputImage": "https://cdn.example.com/veh/front-processed.jpg",
          "backgroundId": "13488",
          "category": "Exterior",
          "clientMetaData": {
            "position": "front"
          }
        }
      ]
    },
    "spin": {
      "skuId": "sku_7a11",
      "aiStatus": "COMPLETED",
      "qcStatus": "APPROVED",
      "spinIframe": "https://spin.spyne.ai/embed/abc123",
      "thumbnailUrl": "https://cdn.example.com/spin-thumb.jpg"
    },
    "video": {
      "aiStatus": "COMPLETED",
      "qcStatus": "APPROVED",
      "videoId": "vid_5512",
      "videoUrl": "https://cdn.example.com/feature.mp4"
    }
  }
}
{
  "message": "At least one identifier (dealerVinId, vin, stockNumber, or registrationNumber) is required"
}
{
  "message": "auth_key is required"
}
{
  "status": "401",
  "message": "Invalid Auth key"
}
{
  "message": "Inventory details not found"
}
{
  "message": "Internal server error"
}

Response parameters (200)

FieldTypeDescription
vinstringExample: 1HGCM82633A004352.
stockNumberstringExample: STK-4471.
registrationNumberstringExample: KA01AB1234.
dealerVinIDstringSpyne's record identifier, returned by the processing request. Example: 3bd1c257-9b32-4933-8cf4-a445fd5b37b8.
sourcestringExample: API.
dealerIdstringTeam the record is attributed to. Example: 86fc402add.
clientMetaDataobjectOpaque metadata echoed back exactly as supplied on the processing request.
mediaDataobject
mediaData.imageobjectCatalog image output. Present when catalog processing was requested.
mediaData.image.skuIdstringExample: sku_9f2c.
mediaData.image.aiStatusstringExample: YET_TO_START.
mediaData.image.qcStatusstringExample: PENDING.
mediaData.image.imageDataobject[]
mediaData.image.imageData[].anglestringExample: front.
mediaData.image.imageData[].statusstringExample: Yet to Start.
mediaData.image.imageData[].frameNointegerExample: 1.
mediaData.image.imageData[].imageIdstringExample: img-bbef1ea1-e055-4571-aa16-02965d1fef14.
mediaData.image.imageData[].imageNamestringExample: 0c4fb0ff-0323-4957-a53c-ffed1d385df4.
mediaData.image.imageData[].inputImagestringExample: https://cdn.example.com/veh/front.jpg.
mediaData.image.imageData[].outputImagestringExample: https://cdn.example.com/veh/front-processed.jpg.
mediaData.image.imageData[].backgroundIdstringExample: 13488.
mediaData.image.imageData[].categorystringExample: Exterior.
mediaData.image.imageData[].clientMetaDataobjectOpaque per-image metadata echoed back exactly as supplied on the processing request.
mediaData.spinobject360 spin output. Present when spin processing was requested.
mediaData.spin.skuIdstringExample: sku_7a11.
mediaData.spin.aiStatusstringExample: COMPLETED.
mediaData.spin.qcStatusstringExample: APPROVED.
mediaData.spin.spinIframestringExample: https://spin.spyne.ai/embed/abc123.
mediaData.spin.spinUrlstringExample: https://spin.spyne.ai/input/abc123.
mediaData.spin.thumbnailUrlstringExample: https://cdn.example.com/spin-thumb.jpg.
mediaData.spin.inputVideoUrlstringExample: https://cdn.example.com/walkaround.mp4.
mediaData.videoobjectFeature video output. Present when feature video processing was requested.
mediaData.video.aiStatusstringExample: COMPLETED.
mediaData.video.qcStatusstringExample: APPROVED.
mediaData.video.videoIdstringExample: vid_5512.
mediaData.video.videoUrlstringExample: https://cdn.example.com/feature.mp4.
mediaData.video.iframeUrlstringExample: https://video.spyne.ai/embed/vid_5512.
mediaData.video.processingStatusstringExample: DONE.
inputDataobjectEcho of the source assets, when recorded against the vehicle.
inputData.assetsInfoobject

Errors

StatusMeaningWhen it happens
400Bad RequestNo identifier supplied, missing auth context, or a bad request relayed from the inventory service.
401UnauthorizedMissing or invalid credential.
404Not FoundNo vehicle matches the supplied identifier.
500Internal Server ErrorUnexpected error, or the inventory service was unreachable.

Status values

FieldValuesMeaning
aiStatusDONE · PROCESSING · FAILEDAI processing lifecycle
qcStatusqc_done · pending · rejectedManual quality check
📘

Show media only when aiStatus is DONE and qcStatus is qc_done. Only the media types you requested appear in mediaData. Surface rejectReason to your users when QC rejects an asset.

Prefer push over polling? Set up a webhook: it delivers the same payload. Field-by-field detail: Explaining API and Webhook Response.


Did this page help you?