POST /api/external/hub/v1/middle_mile_orders
application/json

Body

  • warehouse_id integer Required

    Warehouse ID

  • shipment_ids array[string] Required

    Array of shipment IDs

Responses

  • 200 application/json

    allows shipment IDs from cancelled middle mile orders to be reused

    Hide response attributes Show response attributes object
    • middle_mile_order_number string
    • shipments array[string]
    • message string
  • 422 application/json

    validates shipment IDs are not already associated with existing middle mile orders

    Hide response attribute Show response attribute object
    • errors array[string]
  • 404 application/json

    threepl_customer not found

    Hide response attribute Show response attribute object
    • errors array[string]
  • 401 application/json

    no org_id associated with user

    Hide response attribute Show response attribute object
    • error string
  • 400 application/json

    validates shipment_ids are not empty

    Hide response attribute Show response attribute object
    • errors array[string]
POST /api/external/hub/v1/middle_mile_orders
curl \
 --request POST 'https://api.pattern.com/api/external/hub/v1/middle_mile_orders' \
 --header "Content-Type: application/json" \
 --data '[{"warehouse_id":42,"shipment_ids":["string"]}]'
Request examples
[
  {
    "warehouse_id": 42,
    "shipment_ids": [
      "string"
    ]
  }
]
Response examples (200)
{
  "middle_mile_order_number": "string",
  "shipments": [
    "string"
  ],
  "message": "string"
}
Response examples (422)
{
  "errors": [
    "string"
  ]
}
Response examples (404)
{
  "errors": [
    "string"
  ]
}
Response examples (401)
{
  "error": "string"
}
Response examples (400)
{
  "errors": [
    "string"
  ]
}