updateVehicle
Mutation
Update a vehicle type.
You cannot update the name of a vehicle.
Signature
Section titled “Signature”mutation { updateVehicle( organisationId: UUID! vehicleId: UUID! vehicle: VehicleInput ): Void}Arguments
Section titled “Arguments”| Argument | Type | Default | Description |
|---|---|---|---|
organisationId* | UUID! | — | The ID of the organisation |
vehicleId* | UUID! | — | The ID of the vehicle |
vehicle | VehicleInput | — | The input containing the updated vehicle details |
Return type
Section titled “Return type”Void (Void)
Example
Section titled “Example”mutation UpdateVehicle($organisationId: UUID!, $vehicleId: UUID!, $vehicle: VehicleInput) { updateVehicle(organisationId: $organisationId, vehicleId: $vehicleId, vehicle: $vehicle)}curl -X POST https://my.mobiledock.com/api/v1/graphql \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "mutation UpdateVehicle($organisationId: UUID!, $vehicleId: UUID!, $vehicle: VehicleInput) { updateVehicle(organisationId: $organisationId, vehicleId: $vehicleId, vehicle: $vehicle) }", "variables": { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "vehicleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } }'const response = await fetch('https://my.mobiledock.com/api/v1/graphql', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ query: ` mutation UpdateVehicle($organisationId: UUID!, $vehicleId: UUID!, $vehicle: VehicleInput) { updateVehicle(organisationId: $organisationId, vehicleId: $vehicleId, vehicle: $vehicle) } `, variables: { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "vehicleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, }),});
const data = await response.json();