Initiate a shoot

This section explains how to:

  • Start a new shoot for a vehicle.
  • Resume an unfinished draft shoot.
  • Initiate a reshoot for a completed or failed shoot.

We’ll first guide you through how to start a shoot, then dive into the vehicle matching logic and the reshoot process.


1. Key Terminology

To initiate a shoot for a vehicle, you’ll need to call the startShoot() method. This method requires the following key components:

1.1 ShootData

The ShootData object contains the details about the vehicle being shot. At least one of the following parameters in ShootData must be provided.

FieldTypeRequired?Description
vinString?Vehicle Identification Number (VIN). Must be 17 characters if provided.
stockNumberString?Stock number of the vehicle as per your internal system.
registrationNumberString?Vehicle's registration number.
📘

At least one of vin, stockNumber, or registrationNumber must be provided.

1.2 UserData

The UserData object contains information about the user initiating the shoot.

FieldTypeRequired?Description
userIdStringA unique identifier for the user (e.g., email or system ID).

1.3 Locale

The locale parameter specifies the language in which the shoot interface will be displayed. Refer to the link mentioned below to view the list of supported languages and their code.

Supported Languages

This ensures that the UI during the shoot reflects the preferred language for the user.

📘

If no locale is provided, the SDK will default to "en" (English).

1.4 ShootEnvironment

Mode in which the SDK runs — Production for live shoots or Staging for testing.


Start a shoot

let shootData = ShootData(
    vin: vin, //Must be 17 digits alphanumeric value
    stockNumber: stockNumber,
    registrationNumber: registrationNumber
)

let spyneSDK = SpyneAutomobileSDK.Builder(
    viewController: self,
    delegate: self
)
.setUserData(UserData(userId: "\(user_id)"))
.setShootData(shootData)
.setEnvironment(.staging) // or .production
.setLocale(“en”) // change as per requirement, pass language code
.build()

spyneSDK.startShoot()