Please see API documentation for implementation details. Here list the details required for createBooking mutation.
query:
# Use this mutation for bookings without any mappings and sends directly to Bookings Table.
mutation makeBooking2($input: MakeBookingInput!) {
makeBooking(input: $input) {
uuid
no
jobs {
uuid
trips {
uuid
__typename
}
__typename
}
__typename
}
}
# Use this mutation for bookings with Mappings to send to booking Request.
mutation makeBookingRequest2($input: MakeBookingRequestInput!) {
makeBookingRequest(input: $input)
{ uuid no jobs __typename }
}
variables:
- Note, the uuid is uniquely generated for every booking. Duplicate calls with this UUID will be rejected. This includes the uuid for jobs, and trips.
- Note all time is in UTC time ISO format 2025-06-11T03:52:19.208Z
{
"input": {
"uuid": "c5c11ac0-bb78-4e0b-ba11-301dcdb5749c",
"type": "IMPORT",
"isOverrideBlockDuplicate": false,
"billToUuid": "d42b6932-f02a-4527-8a1b-d2a4ba7ed2c7",
"jobs": [
{
"details": {
"containerNo": "sdfaasdgasd",
"sealNo": "seal",
"containerSize": "40",
"containerType": "DG2",
"trailerType": "SL",
"handling": "-",
"weight": "WEIGHT",
"temperature": "TEMP",
"vesselID": "VESSELID",
"reference": "REF"
},
"type": "IMPORT",
"remarks": "Remarks",
"trips": [
{
"fromCompanyUuid": "176b4ab3-97da-47b6-be4a-f8f96b9dc51b",
"fromUuid": "2de66e02-4d6a-4c2d-a453-2cd472943d2d",
"toCompanyUuid": "3423401b-5964-437d-817d-76590870ffa7",
"toUuid": "f61c04a6-3da7-4d55-96de-2f3a36329ff0",
"remarks": "Remarks Delivery",
"uuid": "ddcdc9d4-b176-4b69-83ab-41ffd76c18ee",
"details": {}
},
{
"fromCompanyUuid": "3423401b-5964-437d-817d-76590870ffa7",
"fromUuid": "f61c04a6-3da7-4d55-96de-2f3a36329ff0",
"toCompanyUuid": "48a74aa7-52ac-4583-8d61-8ee0afaf4890",
"toUuid": "6e5e489c-fba7-4825-91ce-ef7a10a2d8c6",
"remarks": "Remarks Collection",
"uuid": "ea1c99d2-f7d3-4b80-a419-113dbe5599ed",
"details": {}
}
],
"tripFormat": "linear",
"uuid": "25b27d8c-0ff4-48d3-9e1c-9af924698825"
}
],
"details": {
"requiredDate": "2025-04-30T00:16:27.121Z",
"deliveryHour": "24 HRS",
"requestNo": "Request No",
"shippingAgent": "5fac94a9-e91b-4384-b1dd-221ceabd4300",
"operatorCode": "OperationsCode",
"cmo": "CMO",
"bl": "sdafds",
"scn": "asdfdsaf",
"reference": "Reference",
"forwardingAgent": "0431c181-53fa-44f8-835e-90154ee345c9",
"consignee": "da0a2459-402a-435d-8acb-30e6f4c7a985",
"shippingRefNo": "ShippingRefNo",
"soNo": "SoNo",
"vesselName": "asdfasdf",
"voyageNo": "VoyageNo",
"eta": "2025-04-28T00:16:43.039Z",
"storageDate": "2025-05-02T00:17:00.225Z",
"commodity": "Commodity",
"dischargePort": "DischargePort",
"options": [
"backToBack",
"directDelivery",
"directLoading",
"customsSeal",
"importReuseExport",
"diversion"
],
"confirmCoc": true,
"completeness": true
},
"remarks": "Remarks",
"_ext": {
"billToUuid": "externalBillToId",
"details.shippingAgent": "ExternalShippingAgentId",
"jobs": [
"trips": [{
"toCompanyUuid": "firstJobTripToCompanyId",
"toUuid": "firstJobTripToAddressId"
}]
]
}
}
}External Field Mapping (\_ext)
For external integration mapping, use the `_ext` field at the bottom of your request payload. All fields entered into this object will bypass standard validation and will be processed through the external mapping system configured by the ShipX operations team.
Important Rules:
- Exclusive Usage: Fields should be specified in either the main request body OR the `_ext` field, but NOT BOTH.
- Conflict Detection: If the same field path exists in both the main input and `_ext` with different values, the request will be rejected with an error.
- Required Field Validation: If a field is required and not provided in either the main body or `_ext` field, validation will still fail.
- Meta Fields: Fields ending with `.meta` or `Meta` are informational only and do not conflict with data fields.
Error Message:
Conflict Error: "Conflicting fields detected between input and \_ext mapping: [field_names]. Please specify values in either the main input or \_ext mapping, not both. For external integrations, use only \_ext fields."
Best Practices:
- For External Integrations: Use only `_ext` fields for all mapped values
- For Direct API Usage: Use main request body fields
- Mixed Usage: Not supported - choose one approach per request
{
"input": {
"uuid": "...",
"type": "EXPORT",
// Don't include shipperConsignee here if using _ext
"details": {
"requiredDate": "2024-06-20T00:00:00"
// Other non-conflicting fields
},
"_ext": {
"details.shipperConsignee": "33024",
"details.shipperConsigneeMeta": "METTUBE INTERNATIONAL SDN BHD",
"jobs[0].trips[0].details.fromUuid": "8AABDB88-8597-4B81-A2DA-1FB12D02A40E"
}
}
}