LogSwap (...)

Introduction
Final step for a device swap. Records that the device in the install session replaced the removed device on the vehicle, with the vehicle details and optional photos, and ends the install session.
Requires RegisterDevice for the new device first; the serial number passed to InitiateInstall is the new device. An install token can be used for one final call only (see SubmitInstall). Errors (error code): VehicleNameRequired, InvalidVin, MissingRemovedSerialNumber, InvalidRemovedSerialNumber (the new and removed device are the same), DeviceNotRegistered, TooManyPhotos, InvalidPhotoData, UnsupportedMimeType, PhotoTooLarge, 5804 (invalid or expired install token), 5800 (the install token was already submitted), GenericError (the swap could not be recorded), UnsupportedApiVersion.
Parameters

apiKey

The API key (user ID) of the authenticated caller, as returned by Authenticate. Send null when authenticating with a Bearer token.

cameraId

Optional. Camera serial number, if a camera is being paired.

comments

Optional. Installer comments.

engineHours

Optional. Engine hours at the time of the swap.

installToken

The install session token returned by InitiateInstall.

licensePlate

Optional. License plate.

make

Optional. Vehicle make.

model

Optional. Vehicle model.

odometer

Optional. Odometer reading at the time of the swap. Send odometerUnit with it.

odometerUnit

Optional. Unit of the odometer reading: Kilometers or Miles.

photos

Optional photos to attach, as InstallPhotoUpload items. At most 5 photos, each at most 10 MB once decoded, JPEG or PNG only (HEIC is not accepted).

removedSerialNumber

Serial number of the device that was removed.

sessionId

The session ID of the authenticated caller, as returned by Authenticate. Send null when authenticating with a Bearer token.

vehicleName

Name or description of the vehicle.

vin

Vehicle Identification Number.

workOrderReference

Optional. Work order reference number.

year

Optional. Vehicle model year.
Return value
An ApiSwapResult with the record ID, the new and removed serial numbers, the time of the record and the device communication status.
Remarks
Requires RegisterDevice for the new device first; the serial number passed to InitiateInstall is the new device. An install token can be used for one final call only (see SubmitInstall). Errors (error code): VehicleNameRequired, InvalidVin, MissingRemovedSerialNumber, InvalidRemovedSerialNumber (the new and removed device are the same), DeviceNotRegistered, TooManyPhotos, InvalidPhotoData, UnsupportedMimeType, PhotoTooLarge, 5804 (invalid or expired install token), 5800 (the install token was already submitted), GenericError (the swap could not be recorded), UnsupportedApiVersion.
Code samples

Loading API Runner...