shipping.rate.set_many
Set shipping rates in BATCH (at most 5000 rows per call — over the ceiling is a refusal, never a truncated import). Semantics are REPLACE PER PAIR: every (method, zone) with at least one accepted row has its brackets replaced by the accepted rows of that pair; pairs absent from the payload are untouched. Zones may be referenced by id, or by name + postal range (a new name creates the zone; an existing name with a different range rejects the line). dry_run returns the identical report and writes nothing.
- Scope:
shipping.write - System: no
- Reachable from:
POST /v1/commands/shipping.rate.set_many(tenant credential) · MCP toolshipping.rate.set_many· SDKclient.call('shipping.rate.set_many', …) - Events:
shipping.config.updated
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "dry_run": { "type": "boolean" }, "rows": { "items": { "properties": { "delivery_max_days": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "delivery_min_days": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "free_above_amount": { "anyOf": [ { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, { "type": "null" } ] }, "line": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "method_id": { "minLength": 1, "type": "string" }, "method_name": { "minLength": 1, "type": "string" }, "postal_code_from": { "minLength": 1, "type": "string" }, "postal_code_to": { "minLength": 1, "type": "string" }, "price": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "price_percent_bps": { "anyOf": [ { "maximum": 10000, "minimum": 0, "type": "integer" }, { "type": "null" } ] }, "weight_bracket_max_grams": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "zone_id": { "minLength": 1, "type": "string" }, "zone_name": { "minLength": 1, "type": "string" } }, "required": [ "weight_bracket_max_grams", "price", "delivery_min_days", "delivery_max_days" ], "type": "object" }, "maxItems": 5000, "minItems": 1, "type": "array" } }, "required": [ "rows" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "accepted": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "applied": { "type": "boolean" }, "methods_affected": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "rates_deleted": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "rejected": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "rejections": { "items": { "additionalProperties": false, "properties": { "line": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "params": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, "reason": { "enum": [ "method_reference_missing", "method_not_found", "zone_reference_missing", "zone_not_found", "zone_range_required", "zone_range_mismatch", "zone_range_inverted", "delivery_window_inverted", "duplicate_bracket", "zone_overlap_for_method" ], "type": "string" } }, "required": [ "line", "reason", "params" ], "type": "object" }, "type": "array" }, "zones_affected": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "zones_created": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "applied", "accepted", "rejected", "methods_affected", "zones_affected", "zones_created", "rates_deleted", "rejections" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)