# Create middle mile orders **POST /api/external/hub/v1/middle_mile_orders** ## Servers - Public API: https://api.pattern.com (Public API) ## Parameters ### Body: application/json (array[object]) - **warehouse_id** (integer) Warehouse ID - **shipment_ids** (array[string]) Array of shipment IDs ## Responses ### 200 allows shipment IDs from cancelled middle mile orders to be reused #### Body: application/json (object) - **middle_mile_order_number** (string) - **shipments** (array[string]) - **message** (string) ### 422 validates shipment IDs are not already associated with existing middle mile orders #### Body: application/json (object) - **errors** (array[string]) ### 404 threepl_customer not found #### Body: application/json (object) - **errors** (array[string]) ### 401 no org_id associated with user #### Body: application/json (object) - **error** (string) ### 400 validates shipment_ids are not empty #### Body: application/json (object) - **errors** (array[string]) [Powered by Bump.sh](https://bump.sh)