Shipping rules and shipping defaults are predefined actions that automatically apply to your shipments whenever certain conditions are met. You can configure these in your Sendcloud account to streamline and automate your shipping workflows. An example shipping rule: If [parcel weight] is less than [10kg], ship with [PostNL Home address only] There’s a wide range of conditions and actions to choose from, covering nearly every part of the shipment creation process. Once configured, shipping rules and defaults can be applied to shipments created through the API.Documentation Index
Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
Use this file to discover all available pages before exploring further.
Applying Shipping Rules via the API
You can apply shipping rules and defaults to your shipments in the same way as described in the Create a shipment section. There are two ways to do this:- Synchronous creation: Creates and announces the shipment immediately, returning the carrier’s response right away. Ideal for smaller batches or testing scenarios.
- Asynchronous creation: Creates the shipment instantly, but you’ll need to poll another endpoint to check the carrier’s announcement status. Recommended for large-scale or multi-parcel operations.
Note: By default, shipping rules and shipping defaults are always applied when using the Create a shipment with rules
and/or defaults endpoints
Minimal Request Example
Because shipping rules can set most parameters automatically, the only required field when creating a shipment with rules and/or defaults is theto_address object. All other shipment details can be filled in dynamically based on your rules.
Below is a minimal JSON example required to create a shipment with shipping rules and/or shipping defaults - valid for both synchronous and asynchronous endpoints.
Example request body
- HTTP 200 status code
- A shipment object in the response body
- Create a shipment with rules and/or defaults and announce it synchronously
- Create a shipment with rules and/or defaults and announce it asynchronously
Overriding Shipping Rules or Defaults
If you occasionally want to bypass automation for specific shipments, you can disable these features by setting:"apply_shipping_rules": false"apply_shipping_defaults": false