booking
Query
Get a single booking, identified by ID.
To see a booking for which an organisation of yours is the location at, you must have the ViewLocationBookings permission for the location. To see a booking for which an organisation of yours is the carrier for, you must have the ViewCarrierBookings permission for that organisation.
If the booking is present at multiple of your organisations, you only need permission from one to see it.
Signature
Section titled “Signature”query { booking( id: ID! ): Booking}Arguments
Section titled “Arguments”| Argument | Type | Default | Description |
|---|---|---|---|
id* | ID! | — | The ID of the booking |
Return type
Section titled “Return type”Booking (Booking)
Example
Section titled “Example”query Booking($id: ID!) { booking(id: $id) { id pin status { id name description } carrier { id name description } requestedTime bookedTime duration reassignedFrom }}curl -X POST https://my.mobiledock.com/api/v1/graphql \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "query Booking($id: ID!) { booking(id: $id) { id } }", "variables": { "id": "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: ` query Booking($id: ID!) { booking(id: $id) { id pin status { id name description } carrier { id name description } requestedTime bookedTime duration reassignedFrom } } `, variables: { "id": "MDB-26-XXXX-XXXX" }, }),});
const data = await response.json();Example response
Section titled “Example response”{ "data": { "booking": { "id": "MDB-26-GS8Q-8Q30", "pin": "65471", "status": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Approved", "description": "" }, "carrier": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Express Freight Co", "description": "" }, "requestedTime": "2026-03-28T19:00:00Z", "bookedTime": "2026-03-28T19:00:00Z", "duration": 30, "reassignedFrom": "MDB-26-GS8Q-8Q30" } }}