POST /api/external/hub/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 /api/external/hub/v1/shipments/calculate_rates
curl \
 --request POST 'https://api.pattern.com/api/external/hub/v1/shipments/calculate_rates' \
 --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"
}