# Create new consignment Endpoint: PUT /generalConsignments/{consignmentIntegrationId} Version: 1.0.0 Security: M2X_auth_application ## Path parameters: - `consignmentIntegrationId` (string, required) M2X consignment integration id ## Request fields (application/json): - `generalConsignment` (object) - `generalConsignment.integrationId` (string, required) External consignment identifier - `generalConsignment.consignmentReference` (string,null, required) Optional reference label for the consignment Example: "C002901092" - `generalConsignment.properties` (object, required) - `generalConsignment.properties.serviceCode` (string, required) Nature of work, e.g. G = general, WH = warehouse, C = container Enum: "C", "G", "R", "W", "WH" - `generalConsignment.properties.dangerousGoods` (boolean, required) - `generalConsignment.properties.noCharge` (boolean) Indicate internal work that should not be invoiced - `generalConsignment.properties.loadShare` (boolean) Indicate consignment qualifies for load share rating - `generalConsignment.transportNote` (string,null) Any additional human readable detail to be supplied with consignment Example: "Call Bob to confirm" - `generalConsignment.senderReference` (string,null) Optional additional reference label Example: "S49029" - `generalConsignment.fromDateAndTimeConstraint` (object, required) - `generalConsignment.fromDateAndTimeConstraint.date` (string, required) Day required (YYYY-MM-DD) - `generalConsignment.fromDateAndTimeConstraint.timezone` (string, required) IANA (aka TZ database) timezone name Example: "Pacific/Auckland" - `generalConsignment.fromDateAndTimeConstraint.timeConstraint` (any) - `generalConsignment.receiverReference` (string,null) Optional additional reference label Example: "R04746" - `generalConsignment.toDateAndTimeConstraint` (object, required) - `generalConsignment.metadata` (object,null) Opaque passenger data - `mappingRequests` (object) - `mappingRequests.customer` (object, required) Parameters to try to map a customer with M2X - `mappingRequests.customer.customerName` (string) Example: "Fruit World" - `mappingRequests.customer.customerId` (string) Example: "Yc7cXUulBhMM58iuOQce" - `mappingRequests.customer.externalId` (string) Example: "FTW" - `mappingRequests.customer.integrationId` (string) Example: "C99" - `mappingRequests.fromLocation` (object, required) Parameters to try to map a location with M2X - `mappingRequests.fromLocation.locationId` (string,null) M2X internal tracking id for the location code used Example: "C6mruxd3AVUTW14vEZ0v" - `mappingRequests.fromLocation.addressText` (string,null) Address, if present and no locationId or external Id is matching, will try to geocode Example: "123 Example Road, Auckland 1010" - `mappingRequests.fromLocation.externalId` (string,null) External Id Example: "WHC6" - `mappingRequests.fromLocation.locationName` (string,null) Helps user creating the missing mapping upon mapping failure, or used to save location if new Example: "Auckland Storage 1" - `mappingRequests.fromLocation.latitude` (number) Example: -36.983882 - `mappingRequests.fromLocation.longitude` (number) Example: 174.709879 - `mappingRequests.fromLocation.locationNameResolutionEnabled` (boolean) Try to resolve location by name, quick weak method, disabled by default - `mappingRequests.fromLocation.saveIfUnknown` (boolean) If no existing location is found, locationId provided and lat/lng provided or geocode successful, will create location - `mappingRequests.toLocation` (object, required) Parameters to try to map a location with M2X - `mappingRequests.content` (object, required) Specific information about the content carted - `mappingRequests.content.payload` (array, required) - `mappingRequests.content.payload.description` (string,null) Additional detail about the product Example: "BB SKU00390029 25kg" - `mappingRequests.content.payload.measures` (object, required) - `mappingRequests.content.payload.measures.items` (number, required) Primary quantity (meaning is dependent on product code) Example: 10 - `mappingRequests.content.payload.measures.pltOrBin` (integer,null) Number of pallets or bin (omit or null if not available) Example: 10 - `mappingRequests.content.payload.measures.lift` (number,null) lift (omit or null if not available) Example: 3.78 - `mappingRequests.content.payload.measures.volume` (number,null) Cube m³ (omit or null if not available) Example: 12.58 - `mappingRequests.content.payload.measures.mass` (integer,null) kg (omit or null if not available) Example: 8500 - `mappingRequests.content.payload.product` (object, required) Parameters to try to map a product with M2X - `mappingRequests.content.payload.product.productCode` (string,null) Internal M2X product code id Example: "Z5BFB6nUToADamO7M01G" - `mappingRequests.content.payload.product.productCodeExternalId` (string,null) External product code integration id Example: "FERT" - `mappingRequests.content.payload.product.productDescription` (string,null) Helps user creating the missing mapping upon mapping failure Example: "Palletized fertiliser bags (10kg)" ## Response 201 fields (application/json): - `consignmentId` (string, required) Internal M2X consignment id Example: "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224" ## Response 202 fields (application/json): - `consignmentId` (string, required) Internal M2X consignment id Example: "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224" ## Response 400 fields (application/json): - `errors` (array) Issues encountered Example: ["Require at least one of locationId, addressText, externalId or locationName"]