# Calculate shipment rates across warehouses **POST /api/external/hub/v1/shipments/calculate_rates** ## Servers - Public API: https://api.pattern.com (Public API) ## Parameters ### Body: application/json (object) - **shipment_ids** (array[string]) Array of shipment IDs to calculate rates for ## Responses ### 401 Unauthorized - missing or invalid authentication #### Body: application/json (object) - **error** (string) ### 400 Bad Request - empty shipment_ids array #### Body: application/json (object) - **error** (string) ### 200 Rates calculated successfully #### Body: application/json (object) - **rates** (array[object]) ### 404 Not Found - shipment does not exist #### Body: application/json (object) - **error** (string) ### 422 Unprocessable Entity - invalid shipment configuration #### Body: application/json (object) - **error** (string) - **details** (string) ### 500 Internal Server Error - unexpected service exception #### Body: application/json (object) - **error** (string) [Powered by Bump.sh](https://bump.sh)