Skip to main content

When to use bulk

Any workload that would otherwise loop /v1/calc should switch to /v1/calc/bulk. One bulk call:
  • Counts as one rate-limit request (60 rpm) and one quota entry.
  • Pro-rates freight and insurance across rows by line value.
  • Returns per-row results and per-row errors without failing the batch.
  • Caps at 500 rows per call.
Bulk requires Growth tier or higher. Free and Pro cannot mint the key needed to call it. See Authentication.

Request shape

Ship-level fields (destination, currency, incoterm, transport mode, freight, insurance) live at the top. Line-level fields go in rows[].

CSV to JSON mapping

If you are starting from a CSV, the column-to-field mapping is: Ship-level fields (destination_country, currency, incoterm, transport_mode, freight, insurance) must come from a header row, a form field, or a filename convention. They are not per-line.

Convert a CSV and post it

Response shape

Handling row errors

Row errors are non-fatal. A batch of 500 with 3 invalid rows returns 200 with ok_rows: 497 and 3 entries in errors[]. Re-post the failed rows after fixing them; use line_index to correlate back to your source CSV. If you need atomic behavior (“either all 500 succeed or none apply”), implement it client-side: post the batch, and if error_rows > 0, do not commit the results to your downstream system.

Freight and insurance pro-rating

Freight and insurance ship at the shipment level, not per row. The engine pro-rates each across rows by line value:
The pro-rated values are folded into each row’s customs value. If you have per-row freight (unusual), post one shipment per row.