# Upsert Pickup Endpoint: PUT /runs/pickups/{pickupId} Version: 1.0.0 Security: M2X_auth_application ## Path parameters: - `pickupId` (string, required) The unique pickup Id ## Request fields (application/json): - `customer` (object, required) Parameters to try to map a customer with M2X - `customer.customerName` (string) Example: "Fruit World" - `customer.customerId` (string) Example: "Yc7cXUulBhMM58iuOQce" - `customer.externalId` (string) Example: "FTW" - `customer.integrationId` (string) Example: "C99" - `location` (object, required) Parameters to try to map a location with M2X - `location.locationId` (string,null) M2X internal tracking id for the location code used Example: "C6mruxd3AVUTW14vEZ0v" - `location.addressText` (string,null) Address, if present and no locationId or external Id is matching, will try to geocode Example: "123 Example Road, Auckland 1010" - `location.externalId` (string,null) External Id Example: "WHC6" - `location.locationName` (string,null) Helps user creating the missing mapping upon mapping failure, or used to save location if new Example: "Auckland Storage 1" - `location.latitude` (number) Example: -36.983882 - `location.longitude` (number) Example: 174.709879 - `location.locationNameResolutionEnabled` (boolean) Try to resolve location by name, quick weak method, disabled by default - `location.saveIfUnknown` (boolean) If no existing location is found, locationId provided and lat/lng provided or geocode successful, will create location - `content` (object,null) Specific information about the content carted - `content.description` (string) Description of the payload - `content.productBundle` (object) Details of the products carted - `content.productBundle.payload` (array) - `content.productBundle.payload.itemId` (string) - `content.productBundle.payload.quantity` (number) This item quantity - `content.productBundle.payload.description` (string) - `content.productBundle.payload.massKg` (number) Optional override for the weight - `content.productBundle.payload.spatialRequirement` (number) Optional override for the volume - `content.productBundle.payload.unitOfMeasure` (string) Optional unit of measure (e.g. bags) - `content.productBundle.payload.product` (object) Parameters to try to map a product with M2X - `content.productBundle.payload.product.productCodeName` (string) - `content.productBundle.payload.product.productCodeId` (string) - `content.productBundle.payload.metadata` (object,null) Opaque passenger data - `content.productBundle.payload.properties` (object,null) A key value store containing bespoke properties usable for pricing and optimisation - `quantity` (number, required) - `priority` (string) Enum: "LOW", "MEDIUM", "HIGH" - `orderDay` (string) The date from where the deliver will be available for dispatch, if not provided, assume today - `readonlyFields` (object) Specifies which field should not be touched by the user - `readonlyFields.deleted` (boolean) - `readonlyFields.customer` (boolean) - `readonlyFields.location` (boolean) - `readonlyFields.content` (boolean) - `readonlyFields.product` (boolean) - `readonlyFields.properties` (boolean) ## Response 200 fields (application/json): - `success` (boolean) Example: true ## Response 400 fields (application/json): - `error` (string) The issue description - `code` (string) The code for the issue Enum: "CUSTOMER_NOT_FOUND", "INVALID_SCHEMA", "PRODUCT_NOT_FOUND", "LOCATION_NOT_FOUND", "CONTENT_NOT_RESOLVED", "INTERNAL_ERROR"