Skip to main content
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.

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.
All conditions described in the synchronous and asynchronous announcement endpoints also apply to these “create with rules/defaults” endpoints.
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 the to_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
{
  "to_address": {
    "name": "John Doe",
    "company_name": "Sendcloud",
    "address_line_1": "Insulindelaan 115",
    "house_number": "115",
    "postal_code": "5642CV",
    "city": "Eindhoven",
    "country_code": "NL",
    "phone_number": "+31612345678",
    "email": "john.doe@sendcloud.com",
    "po_box": "PO Box 678"
  }
}
If you want to include a shipping option code in your request—even if a shipping rule will likely override it—use the placeholder option: "shipping_option_code": "sendcloud:letter" (Unstamped letter).
When successful, the API returns:
  • HTTP 200 status code
  • A shipment object in the response body
See the API reference for detailed response schema examples:

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
If a shipment created with rules applied doesn’t meet your expectations, you can cancel it and create a new one - either with or without shipping rules and/or defaults.

Shipping Rules and Defaults API Limitations

Not all shipping rules or actions can be applied through this API due to the shipment data available at the time of request. Some conditions and actions depend on information or processes that are only accessible within the Sendcloud Platform. Additionally, even rules that can normally be applied to single‑collo shipments may not fully work for multi‑collo shipments, as certain rule conditions are evaluated per parcel rather than per shipment. To view the complete list of shipping rule limitations for this endpoint, refer to the documentation here.