> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shipping rules & shipping defaults

[Shipping rules](https://support.sendcloud.com/hc/en-us/articles/10274470454292-How-to-create-shipping-rules) and [shipping defaults](https://support.sendcloud.com/hc/en-us/articles/12213808740116-How-to-set-up-your-default-shipping-settings) 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](/docs/shipments/create-a-shipment) section. There are two ways to do this:

* [Synchronous creation](/api/v3/shipments/create-a-shipment-with-rules-and-or-default-and-announce-it-synchronously): Creates and announces the shipment immediately, returning the carrier’s response right away. Ideal for smaller batches or testing scenarios.
* [Asynchronous creation](/api/v3/shipments/create-a-shipment-with-rules-and-or-default-and-announce-it-asynchronously): 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](/docs/shipments/create-a-shipment#synchronous-announcement) and [asynchronous](/docs/shipments/create-a-shipment#asynchronous-announcement) announcement endpoints also apply to these “create with rules/defaults” endpoints.

<Note>
  Note: By default, shipping rules and shipping defaults are always applied when using the Create a shipment with rules
  and/or defaults endpoints
</Note>

## 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.

```json Example request body theme={null}
{
  "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"
  }
}
```

<Tip>
  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).
</Tip>

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:

* [Create a shipment with rules and/or defaults and announce it synchronously](/api/v3/shipments/create-a-shipment-with-rules-and-or-default-and-announce-it-synchronously)
* [Create a shipment with rules and/or defaults and announce it asynchronously](/api/v3/shipments/create-a-shipment-with-rules-and-or-default-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`

If a shipment created with rules applied doesn’t meet your expectations, you can [cancel it](docs/shipments/cancel-a-shipment) 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](/api/v3/shipments/create-a-shipment-with-rules-and-or-default-and-announce-it-asynchronously#shipping-rules).
