# Create or Update Distribution Orders using externalDOID and externalRowID **POST /v2/api/distributionorders/batch** Create or Update Distribution Orders using externalDOID and externalRowID ## Servers - https://api.maddenanalytics.com: https://api.maddenanalytics.com () ## Authentication methods - Bearer ## Parameters ### Body: application/json (array[object]) composite key is required per item - **cancelledDate** (string) Date that the order was cancelled - **completedDate** (string) Date that the order was received and completed: - **deliveredQuantity** (integer) Quantity that has been relocated - **deliveryDate** (string) Date that the order will be delivered - **deliveryWindow** (string) Delivery Window of DO (if any) - **externalDistributionOrderId** (string) The external distribution order id used as a header - **externalRowId** (string) The external row id - **fromWarehouseExternalId** (string) The external id of the warehouse where quantity is moved from - **id** (integer) - **key** (string) Key, used as a reference to source system - **label** (string) Label of the DO (if any) - **orderDate** (string) Date that the purchase order was created - **orderType** (string) Order type of DO (if any) - **quantity** (integer) Quantity to be relocated - **shippedAt** (string) Date that the order was shipped - **status** (string) Default values that are set based on other fields: CANCELLED if CancelledAt is set, COMPLETED if DeliveredQuantity >= Quantity else PROCESSING. Additional possible statuses: ALLOCATED, IN TRANSIT. (handled manually) - **toWarehouseExternalId** (string) The external id of the warehouse where quantity is moved to ## Responses ### 200 Returns an array of responses for each item in the batch, 400 if any item fails #### Body: application/json (array[object]) - **message** (string) - **reference** (string) - **referenceField** (string) - **statusCode** (integer) ### default All errors will return the same object with a describing code & message #### Body: application/json (object) - **error** (string) - **message** (string) - **statusCode** (integer) [Powered by Bump.sh](https://bump.sh)