overrideBookingVehicle
Mutation
Override the vehicle of an existing booking
Signature
Section titled “Signature”mutation { overrideBookingVehicle( organisationId: UUID! bookingId: ID! vehicleId: UUID vehicle: EntityRefInput ): Void}Arguments
Section titled “Arguments”| Argument | Type | Default | Description |
|---|---|---|---|
organisationId* | UUID! | — | The ID of the organisation |
bookingId* | ID! | — | The ID of the booking |
vehicleId | UUID | — | The ID of the new vehicle for the booking |
vehicle | EntityRefInput | — | The new vehicle reference for the booking |
Return type
Section titled “Return type”Void (Void)
Example
Section titled “Example”mutation OverrideBookingVehicle($organisationId: UUID!, $bookingId: ID!, $vehicleId: UUID, $vehicle: EntityRefInput) { overrideBookingVehicle(organisationId: $organisationId, bookingId: $bookingId, 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 OverrideBookingVehicle($organisationId: UUID!, $bookingId: ID!, $vehicleId: UUID, $vehicle: EntityRefInput) { overrideBookingVehicle(organisationId: $organisationId, bookingId: $bookingId, vehicleId: $vehicleId, vehicle: $vehicle) }", "variables": { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bookingId": "MDB-26-XXXX-XXXX" } }'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 OverrideBookingVehicle($organisationId: UUID!, $bookingId: ID!, $vehicleId: UUID, $vehicle: EntityRefInput) { overrideBookingVehicle(organisationId: $organisationId, bookingId: $bookingId, vehicleId: $vehicleId, vehicle: $vehicle) } `, variables: { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bookingId": "MDB-26-XXXX-XXXX" }, }),});
const data = await response.json();