# Update/create customer booking by ID Endpoint: PUT /customerBookings/{customerBookingId} Version: 1.0.0 Security: M2X_auth_application ## Path parameters: - `customerBookingId` (string, required) The booking Id ## Request fields (application/json): - `booking` (object) - `booking.externalReference` (string) - `booking.externalNote` (string) - `booking.canceled` (boolean) - `booking.properties` (object,null) A key value store containing bespoke properties usable for pricing and optimisation - `booking.quantity` (number) The product quantity - `booking.productSpatialRequirement` (number,null) Optional override for the volume - `booking.productMassKg` (number,null) Optional total weight override for the booking - `booking.fromLocation` (object) - `booking.fromLocation.addressText` (string, required) - `booking.fromLocation.latitude` (number, required) - `booking.fromLocation.longitude` (number, required) - `booking.fromLocation.locationName` (string, required) - `booking.fromLocation.locationId` (string,null) The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID. - `booking.fromLocation.externalId` (string,null) An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources. - `booking.fromLocation.timezone` (string) IANA (aka TZ database) timezone name Example: "Pacific/Auckland" - `booking.fromLocation.properties` (object,null) - `booking.fromReference` (string) The sender's reference - `booking.fromDateAndTimeConstraint` (object) - `booking.fromDateAndTimeConstraint.date` (string, required) Day required (YYYY-MM-DD) - `booking.fromDateAndTimeConstraint.timeConstraint` (any) - `booking.fromContactDetails` (object) - `booking.fromContactDetails.email` (string) - `booking.fromContactDetails.phone` (string) - `booking.fromContactDetails.name` (string) - `booking.toLocation` (object) - `booking.toReference` (string) The receiver's reference - `booking.toDateAndTimeConstraint` (object) - `booking.toContactDetails` (object) - `mappingRequests` (object) - `mappingRequests.content` (object,null) Specific information about the content of the booking - `mappingRequests.content.description` (string) Description of the payload - `mappingRequests.content.productBundle` (object) Details of the products carted - `mappingRequests.content.productBundle.payload` (array) - `mappingRequests.content.productBundle.payload.quantity` (number) This item quantity - `mappingRequests.content.productBundle.payload.description` (string) - `mappingRequests.content.productBundle.payload.massKg` (number) Optional override for the weight in kg - `mappingRequests.content.productBundle.payload.spatialRequirement` (number) Optional override for the volume in cubic meter - `mappingRequests.content.productBundle.payload.pltOrBin` (number) Optional, pallet or bins quantity for general freight products - `mappingRequests.content.productBundle.payload.notes` (string) Optional notes - `mappingRequests.content.productBundle.payload.product` (object) - `mappingRequests.content.productBundle.payload.product.productCode` (string,null) M2X internal tracking id for the product code used - `mappingRequests.content.productBundle.payload.product.productCodeExternalId` (string,null) External Id for product tracking - `mappingRequests.content.productBundle.payload.product.productDescription` (string,null) Helps user creating the missing mapping upon mapping failure ## Response 200 fields (application/json): - `success` (boolean) Example: true ## Response 400 fields (application/json): - `message` (string) Example: "missing data" ## Response 202 fields