The Shipping Rule object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: false
Default: Fixed
{
"id": "shipping-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"label": "label_example",
"disabled": false,
"shipping_rule_type": "shipping_rule_type_example",
"company": "Example Corp",
"account": "account_example",
"cost_center": "cost_center_example",
"calculate_based_on": "Fixed",
"shipping_amount": 0,
"project": "project_example"
} /api/accounts/shipping-rule/{id} Retrieve a shipping rule
Retrieves the details of an existing shipping rule. Supply the unique shipping rule ID that was returned from a previous request.
Path parameters
The identifier of the shipping rule to retrieve.
Returns
Returns the shipping rule object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/shipping-rule/shipping-rule_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "shipping-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"label": "label_example",
"disabled": false,
"shipping_rule_type": "shipping_rule_type_example",
"company": "Example Corp",
"account": "account_example",
"cost_center": "cost_center_example",
"calculate_based_on": "Fixed",
"shipping_amount": 0,
"project": "project_example"
} /api/accounts/shipping-rule List all shipping rules
Returns a list of shipping rules. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of shipping rule objects.
curl https://api.overplane.dev/api/accounts/shipping-rule \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "shipping-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"label": "label_example",
"disabled": false,
"shipping_rule_type": "shipping_rule_type_example",
"company": "Example Corp",
"account": "account_example",
"cost_center": "cost_center_example",
"calculate_based_on": "Fixed",
"shipping_amount": 0,
"project": "project_example"
}
],
"has_more": false,
"total": 1
} /api/accounts/shipping-rule Create a shipping rule
Creates a new shipping rule object.
Body parameters
Default: false
Default: Fixed
Returns
Returns the newly created shipping rule object if the call succeeded.
curl https://api.overplane.dev/api/accounts/shipping-rule \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"label":"label_example","company":"Example Corp","account":"account_example","cost_center":"cost_center_example"}' {
"id": "shipping-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"label": "label_example",
"disabled": false,
"shipping_rule_type": "shipping_rule_type_example",
"company": "Example Corp",
"account": "account_example",
"cost_center": "cost_center_example",
"calculate_based_on": "Fixed",
"shipping_amount": 0,
"project": "project_example"
} /api/accounts/shipping-rule/{id} Update a shipping rule
Updates the specified shipping rule by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the shipping rule to update.
Body parameters
Default: false
Default: Fixed
Returns
Returns the updated shipping rule object.
curl https://api.overplane.dev/api/accounts/shipping-rule/shipping-rule_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"label":"label_example","disabled":false}' {
"id": "shipping-rule_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"label": "label_example",
"disabled": false,
"shipping_rule_type": "shipping_rule_type_example",
"company": "Example Corp",
"account": "account_example",
"cost_center": "cost_center_example",
"calculate_based_on": "Fixed",
"shipping_amount": 0,
"project": "project_example"
} /api/accounts/shipping-rule/{id} Delete a shipping rule
Permanently deletes a shipping rule. This cannot be undone.
Path parameters
The identifier of the shipping rule to delete.
Returns
Returns a confirmation that the shipping rule has been deleted.
curl https://api.overplane.dev/api/accounts/shipping-rule/shipping-rule_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "shipping-rule_abc123",
"deleted": true
} Line items
Child objects that belong to this shipping rule. These are accessed via the parent's ID.
Shipping Rule Condition
Attributes
Endpoints
/api/accounts/shipping-rule-condition?parent_id={id} /api/accounts/shipping-rule-condition /api/accounts/shipping-rule-condition/{id} /api/accounts/shipping-rule-condition/{id} /api/accounts/shipping-rule-condition/reorder {
"id": "shipping-rule-condition_abc123",
"idx": 1,
"shipping_rule_id": "shipping_rule_id_example",
"from_value": 0,
"to_value": 0,
"shipping_amount": 0
} Shipping Rule Country
Attributes
Endpoints
/api/accounts/shipping-rule-country?parent_id={id} /api/accounts/shipping-rule-country /api/accounts/shipping-rule-country/{id} /api/accounts/shipping-rule-country/{id} /api/accounts/shipping-rule-country/reorder {
"id": "shipping-rule-country_abc123",
"idx": 1,
"shipping_rule_id": "shipping_rule_id_example",
"country": "country_example"
}