Create middle mile orders Run in API Explorer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developer.pattern.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Hub API MCP server": {
    "url": "https://developer.pattern.com/mcp"
  }
}

Close
POST /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 /v1/middle_mile_orders
curl \
 --request POST 'https://api.pattern.com/hub/v1/middle_mile_orders' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --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"
  ]
}