Skip to main content
Shipping rules let you automate how shipments are handled. A rule applies one or more actions to a shipment whenever the shipment matches its conditions, so you can set shipping methods, add insurance, or update other properties without manual work.

Endpoints

Managing rules

Possibilities

Use these endpoints to discover the valid values for building rule conditions and actions.

How rules work

Rules are evaluated in order, from first to last. When a shipment matches a rule’s conditions, its actions are applied. Multiple rules can match the same shipment — all matching rules are applied in order. Use Reorder your shipping rules to control evaluation order.

Importer of record actions

When a rule sets any importer of record action (set_ior_*), we recommend also setting set_ior_name, set_ior_street_name, set_ior_postal_code, set_ior_city and set_ior_country if the order, or another rule applied to it, doesn’t already provide them. These actions are optional for the rule, but the same fields are required in the customs information form. The other importer of record actions (company name, house number, address 2, state, email and phone number) are optional.

Development status

The Shipping Rules v3 API is currently in beta, meaning that it is still under development. During this phase, we continually monitor and test the API to improve its performance, review the requested and the returned data, and uncover any potential bugs that could have a future impact on our users.
Please note that there is a possibility of experiencing breaking changes while the API is still in beta.