Vehicles
All vehicles for a user
Section titled “All vehicles for a user”http https://sls-api.sheepcrm.com/selfservice/v2/example/vehicles/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 200 OK{ "contact_uri": "/example/person/5c7ea02b8b388011210462fc/", "vehicles": [ { "capacity": null, "co2_emissions": null, "colour": null, "created": "2022-02-28T18:06:07.336000", "display_value": "Tesla Model 3", "engine_number": null, "fuel_type": null, "identifying_number": null, "insurance_date": null, "make": "Tesla", "manufacturer": null, "model": "Model 3", "mot_date": null, "notes": null, "owner": null, "photo": null, "registration_number": "EX99AMP", "record_state": "updated", "tags": [], "vehicle_type": "car", "uid": "621d0f0feb692622a9588405", "uri": "/example/vehicle/621d0f0feb692622a9588405/" } ]}A single vehicle
Section titled “A single vehicle”http https://sls-api.sheepcrm.com/selfservice/v2/example/vehicles/{vehicle_uid}/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 200 OK{ "vehicle": { "make": "Tesla", "model": "Model 3", "registration_number": "EX99AMP", "vehicle_type": "car", "master_vehicle": "/example/vehicle/6391ffb503f5ff169555816b/", "master_vehicle_data": { ... }, "owners": [ { "end_date": null, "owner_for_display": "Mr James Example", "owner_uri": "/example/person/5c7ea02b8b388011210462fc/", "start_date": null, "uri": "/example/connection/637df77f6769fff7e3a0d6f0/" } ], "photo": "https://s3-eu-west-1.amazonaws.com/sheepcrm/example/vehicle/.../photo/rhd-model-3-social.png", ... }}Find a vehicle
Section titled “Find a vehicle”http https://sls-api.sheepcrm.com/selfservice/v2/example/vehicles/find/ "Authorization: Bearer $APP_API_KEY" registration_number==EX99AMP
HTTP/1.1 200 OK{ ...}Get a single vehicle (V1)
Section titled “Get a single vehicle (V1)”http GET https://api.sheepcrm.com/api/v1/sheep-app/user/$USER_ID/vehicles/flock/$FLOCK/{slugified_vehicle_uid}/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 200 OK{ ...}Edit a vehicle
Section titled “Edit a vehicle”Edit the vehicle by sending key-value pairs of the fields you want to change.
http PUT https://api.sheepcrm.com/api/v1/sheep-app/user/$USER_ID/vehicles/flock/$FLOCK/{slugified_vehicle_uid}/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 200 OK{ ...}Add an owner to a vehicle
Section titled “Add an owner to a vehicle”Ownership of a vehicle is modelled as a connection between a contact and a vehicle.
This uses the same endpoint as edit vehicle. Set the new_owner_uri key with a valid contact URI. Owners can be added to vehicles in the same submission as other changes.
http PUT https://api.sheepcrm.com/api/v1/sheep-app/user/$USER_ID/vehicles/flock/$FLOCK/{slugified_vehicle_uid}/ "Authorization: Bearer $APP_API_KEY" new_owner_uri=/example/person/5c7ea02b8b388011210462fc/
HTTP/1.1 200 OK{ "errors": {}, "updates": { "new_owner_uri": "/example/person/5c7ea02b8b388011210462fc/" }}Delete a vehicle ownership
Section titled “Delete a vehicle ownership”http DELETE https://api.sheepcrm.com/api/v1/sheep-app/user/$USER_ID/vehicles/flock/$FLOCK/{slugified_vehicle_uid}/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 200 OK{ "status": "ok"}