# Update/create carrier large contract by ID Endpoint: PUT /largeContracts/{contractId} Version: 1.0.0 Security: M2X_auth_application ## Path parameters: - `contractId` (string, required) M2X large contract id ## Request fields (application/json): - `contract` (object, required) - `contract.contractId` (string, required) - `contract.externalId` (string) - `contract.bookingId` (string) - `contract.customerBookingId` (string) - `contract.quantity` (number, required) The product quantity - `contract.properties` (object,null) A key value store containing custom properties - `contract.fromTimeConstraint` (object) - `contract.fromTimeConstraint.type` (string, required) Enum: "NO_LATER_THAN", "NOT_EARLIER_THAN", "SPECIFIC_TIME", "INTERVAL", "NONE" - `contract.fromTimeConstraint.time` (string,null) 24h time requested, only required if type is NO_LATER_THAN,NOT_EARLIER_THAN or SPECIFIC_TIME Example: "11:52" - `contract.fromTimeConstraint.start` (string,null) 24h time requested, only required if type is INTERVAL Example: "11:52" - `contract.fromTimeConstraint.end` (string,null) 24h time requested, only required if type is INTERVAL Example: "14:52" - `contract.fromTimeConstraint.timezone` (string, required) IANA (aka TZ database) timezone name Example: "Pacific/Auckland" - `contract.toTimeConstraint` (object) - `contract.noteLong` (string) Long note - `contract.noteShort` (string) Short note - `contract.priceTotal` (number,null) Total transport price. Use priceTotal OR pricePerUnit + priceUnitOfMeasure - `contract.pricePerUnit` (number,null) Transport price per unit - `contract.priceUnitOfMeasure` (string,null) Unit of measure used for transport pricing e.g. metric values ea, t, kg, m3, km and imperial values ea, tn, cwt, lb, ft3, mi - `contract.adjustmentPriceTotal` (number,null) Total adjustment price when specifying a fixed price. Use adjustmentPriceTotal OR adjustmentPricePerUnit + adjustmentPriceUnitOfMeasure - `contract.adjustmentPricePerUnit` (number,null) Price per unit - `contract.adjustmentPriceUnitOfMeasure` (string,null) Unit of measure used for adjustment pricing e.g. no value allows adjustmentPricePerUnit to be specified as a decimal percentage of transport total price, metric values t, kg, km and imperial values tn, cwt, lb, mi - `contract.transportPricePerUnit` (number) Transport price per unit - `contract.validFromDate` (string) The date this contract is valid from - `contract.requiredByDate` (string) The date this contract needs to be completed by - `contract.draft` (boolean) True if the contract is a draft - `contract.readonlyFields` (object) Specifies which field should not be touched by the user - `contract.readonlyFields.customer` (boolean) - `contract.readonlyFields.product` (boolean) - `contract.readonlyFields.quantity` (boolean) - `contract.readonlyFields.fromLocation` (boolean) - `contract.readonlyFields.toLocation` (boolean) - `contract.readonlyFields.properties` (boolean) - `contract.readonlyFields.noteLong` (boolean) - `contract.readonlyFields.noteShort` (boolean) - `contract.readonlyFields.transportPricePerUnit` (boolean) - `contract.readonlyFields.validFromDate` (boolean) - `contract.readonlyFields.requiredByDate` (boolean) - `contract.readonlyFields.deleted` (boolean) - `mappingRequests` (object, required) - `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.integrationId` (string) Example: "C99" - `mappingRequests.content` (object,null) Specific information about the content of the contract - `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.properties` (object,null) A key value store containing bespoke properties usable for pricing and optimisation - `mappingRequests.product` (object, required) Parameters to try to map a product with M2X - `mappingRequests.product.productCodeName` (string) - `mappingRequests.product.productCodeId` (string) - `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.branch` (object) Parameters to try to map a branch with M2X - `mappingRequests.branch.branchId` (string,null) - `mappingRequests.branch.branchName` (string,null) ## Response 200 fields (application/json): - `contractId` (string) Example: "ABC123-example-1697761533817" ## Response 400 fields (application/json): - `message` (string) Example: "missing data"