Overview

A webhook allows external systems to receive real-time updates from Spyne. When an event occurs, such as when a 360-Spin is processed and available to be consumed, our system will send an HTTP request to the specified endpoint.

How It Works:

You need to provide a publicly accessible URL i.e. Webhook URL, to receive Spin details.
When the vehicle is processed, an event is triggered from Spyne, a POST request containing a JSON payload is sent to your endpoint. You must handle the payload and acknowledge the receipt with a 200 OK response.

Webhook Endpoint

Clients need to create a public endpoint to consume the webhook events.

Endpoint Example:
POST https://clientdomain.com/webhooks/product-events

Payload Structure

Here’s an example of a sample payload sent to your webhook URL. In your case, you can break down the JSON payload as seen in the sample:

{
  "VIN": "1FMCU9MN4RUA88130",
  "photos": [
    {
      "angle": 0,
      "status": "Done",
      "frame_no": "8",
      "image_id": "img-7318f85b-bfec-47a0-9d7a-df698e6f1b3a",
      "image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_replace_bg_2affdbe0-f0fa-4789-bdf6-7de9867a9843.jpg",
      "image_name": "1FMCU9MN4RUA88130_b82a1e31170c45bb8b7cde63daac3a1b_360_exterior_1",
      "image_category": "360_exterior",
      "lowres_image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/73fac923-af18-45c8-bb56-58fdce7ef981.jpg"
    },
    {
      "angle": 40,
      "status": "Done",
      "frame_no": "1",
      "image_id": "img-b3969255-b48b-4090-9915-33a69dfdac26",
      "image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_replace_bg_e00e426b-08cb-4c4c-8fa9-032b32c2bd01.jpg",
      "image_name": "1FMCU9MN4RUA88130_b82a1e31170c45bb8b7cde63daac3a1b_360_exterior_2",
      "image_category": "360_exterior",
      "lowres_image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/961c01c8-bf81-4f15-a3cf-65a9250b83f6.jpg"
    }
  ],
  "sku_id": "b82a1e31170c45bb8b7cde63daac3a1b",
  "user_id": "b1c0f36a",
  "sku_name": "1FMCU9MN4RUA88130",
  "meta_data": "{\"vin\": \"1FMCU9MN4RUA88130\", \"make\": \"Ford\", \"year\": \"2024\", \"model\": \"Escape\", \"ratio\": \"4x3\", \"imgx_url\": \"https://chuckandersonford-ez360.imgix.net/\", \"library_id\": \"202408051713\", \"project_id\": \"chuckandersonford_080524\", \"detectHotspot\": true}",
  "signature": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0X2lkIjoiZTVhZTUwYzVjZGUzNDVlOTgzNmFjN2VjOTc1YjQ2NTgiLCJza3VfaWQiOiJiODJhMWUzMTE3MGM0NWJiOGI3Y2RlNjNkYWFjM2ExYiIsImlhdCI6MTcyOTA1NjY1OCwiZXhwIjoxNzU5ODE1MDU4fQ.DlPyFe9Fjw600W1_eeHq_uMZ-dBqIWTJAtHEszsByKA",
  "360_iframe": "https://assets.spyne.ai/360?sku_id=b82a1e31170c45bb8b7cde63daac3a1b",
  "360_photos": [
    {
      "angle": 10,
      "status": "Done",
      "frame_no": "34",
      "hotspots": [
        {
          "hotspot_id": "front_plate",
          "hotspot_name": "front_plate",
          "hotspot_image": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_hotspot_tracking_e979d74f-a6a2-4d8c-8d0b-49af762e0be4.png",
          "hotspot_category": "tag",
          "hotspot_coordinates": {
            "x": 28.61111111111111,
            "y": 70.87962962962963
          }
        },
        {
          "hotspot_id": "front_windshield",
          "hotspot_name": "front_windshield",
          "hotspot_image": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_hotspot_tracking_75d3bb14-227a-4780-9ca2-969064004cef.png",
          "hotspot_category": "tag",
          "hotspot_coordinates": {
            "x": 46.31944444444444,
            "y": 34.72222222222222
          }
        }
      ],
      "image_id": "img-4ad26e3a-e957-4aac-81a7-5885c93f82e9",
      "image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_replace_bg_ae9557cd-1545-453d-ad50-2734cc7f8f12.png",
      "image_name": "b82a1e31170c45bb8b7cde63daac3a1b_3D_Model_1",
      "image_category": "3D_Model",
      "lowres_image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/1951ea4f-d87e-4005-81f8-7967d450c38e.jpg",
      "stabilized_frame": "https://spyne-acceleration.s3-accelerate.amazonaws.com/2024-10-16/3d_renders_fd022a6f-41a8-4eba-8064-50aff0abbd6e.png"
    },
    {
      "angle": 20,
      "status": "Done",
      "frame_no": "35",
      "hotspots": [
        {
          "hotspot_id": "front_plate",
          "hotspot_name": "front_plate",
          "hotspot_image": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_hotspot_tracking_e979d74f-a6a2-4d8c-8d0b-49af762e0be4.png",
          "hotspot_category": "tag",
          "hotspot_coordinates": {
            "x": 17.32638888888889,
            "y": 69.25925925925927
          }
        },
        {
          "hotspot_id": "front_windshield",
          "hotspot_name": "front_windshield",
          "hotspot_image": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_hotspot_tracking_75d3bb14-227a-4780-9ca2-969064004cef.png",
          "hotspot_category": "tag",
          "hotspot_coordinates": {
            "x": 44.82638888888889,
            "y": 34.62962962962963
          }
        }
      ],
      "image_id": "img-9d9de26b-7004-419a-ade0-34084045734c",
      "image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/car_replace_bg_c916dd48-f66f-4fcf-9ecd-b29545b17a38.png",
      "image_name": "b82a1e31170c45bb8b7cde63daac3a1b_3D_Model_2",
      "image_category": "3D_Model",
      "lowres_image_url": "https://spyne-media.s3.amazonaws.com/2024-10-16/33938553-6973-4a3b-9051-6e17c357d506.jpg",
      "stabilized_frame": "https://spyne-acceleration.s3-accelerate.amazonaws.com/2024-10-16/3d_renders_4e7b9de7-5814-440f-935c-8bb5a7dec1e8.png"
    }
  ],
  "project_id": "e5ae50c5cde345e9836ac7ec975b4658",
  "sku_status": "Done",
  "background_id": "33807"
}

Fields:

VIN: The unique Vehicle Identification Number (VIN) for the car.
Example: "1FMCU9MN4RUA88130"
An array of exterior images of the car, each with specific details like angle, status, and URLs.

sku_id: Unique identifier for the SKU (Stock Keeping Unit) of the vehicle.
Example: "b82a1e31170c45bb8b7cde63daac3a1b"

user_id: Unique identifier for the user associated with the vehicle.
Example: "b1c0f36a"

sku_name: The name of the SKU, typically the VIN.
Example: "1FMCU9MN4RUA88130"

meta_data: A string containing additional metadata like make, model, year, and project details.
Example: "{"vin": "1FMCU9MN4RUA88130", "make": "Ford", "year": "2024", "model": "Escape"}"

signature: A JWT signature used for authentication.

360_iframe: URL to the iframe that shows a 360-degree view of the car.
Example: "https://assets.spyne.ai/360?sku_id=b82a1e31170c45bb8b7cde63daac3a1b"

360_photos: Array of 360-degree images, each with information like angle, hotspots, and URLs.

sku_status: Status of the SKU (e.g., "Done").

background_id: Unique identifier for the background used in the Photos/Spin.Example:

Webhook Response

When a webhook is received by you, we expect a response with an acknowledgment to indicate successful processing. If the response is anything other than a 2xx status, our system will retry the webhook.

Retries & Error Handling

To ensure reliable delivery, our webhook system will retry the failed webhook notifications for 3 times if the receiving endpoint does not respond with a 2xx status code.