Calculate shipment rates across warehouses 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/shipments/calculate_rates
application/json

Body

  • shipment_ids array[string] Required

    Array of shipment IDs to calculate rates for

Responses

  • 401 application/json

    Unauthorized - missing or invalid authentication

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

    Bad Request - empty shipment_ids array

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

    Rates calculated successfully

    Hide response attribute Show response attribute object
    • rates array[object]
      Hide rates attributes Show rates attributes object
      • warehouse object
        Hide warehouse attributes Show warehouse attributes object
        • id integer
        • warehouse_name string
      • shipments array[object]
        Hide shipments attributes Show shipments attributes object
        • shipment_id string
        • fulfillment_center_code string
        • cubic_feet_est number
        • estimate_usd number
  • 404 application/json

    Not Found - shipment does not exist

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

    Unprocessable Entity - invalid shipment configuration

    Hide response attributes Show response attributes object
    • error string
    • details string
  • 500 application/json

    Internal Server Error - unexpected service exception

    Hide response attribute Show response attribute object
    • error string
POST /v1/shipments/calculate_rates
curl \
 --request POST 'https://api.pattern.com/hub/v1/shipments/calculate_rates' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"shipment_ids":["string"]}'
Request examples
{
  "shipment_ids": [
    "string"
  ]
}
Response examples (401)
{
  "error": "string"
}
Response examples (400)
{
  "error": "shipment_ids parameter is required"
}
Response examples (200)
{
  "rates": [
    {
      "warehouse": {
        "id": 42,
        "warehouse_name": "string"
      },
      "shipments": [
        {
          "shipment_id": "string",
          "fulfillment_center_code": "string",
          "cubic_feet_est": 42.0,
          "estimate_usd": 42.0
        }
      ]
    }
  ]
}
Response examples (404)
{
  "error": "string"
}
Response examples (422)
{
  "error": "string",
  "details": "string"
}
Response examples (500)
{
  "error": "string"
}