Skip to content
extensions / Commerce extension
POST/api/projects/{project_id}/sales/shipment-rules

Create Shipment Rule

Creates a shipment rate rule for a project.

GETPOST

Authentication

Requirement
Required
Credential type
Bearer API key
Scopes
Not specified

Permissions

  • Requests are scoped to the target project_id. API-key requests must use a key with an active connection to that project.

Headers

NameRequiredTypeDetails
AuthorizationYesNot specified
Description: Bearer credential used to authenticate the request.

Path Parameters

NameRequiredTypeDetails
project_idYesNot specified
Description: Target project identifier.

Query Parameters

Request Body

Schema: UpsertShipmentRuleRequest

FieldRequiredTypeDetails
nameNostring
Description: Display name.
descriptionNostring
Description: Long-form description text.
is_activeNoboolean
Description: Boolean flag.
priorityNointeger
Description: Integer value.
discard_subsequentNoboolean
Description: Boolean flag.
shipping_carriersNoJSON
Description: JSON object.
shipping_methodsNoJSON
Description: JSON object.
ignore_free_shipping_promoNoboolean
Description: Boolean flag.
calculation_typeNostring
Description: Text value.
base_rateNorust_decimal::Decimal
Description: Value used by this operation.
fixed_rate_per_productNorust_decimal::Decimal
Description: Value used by this operation.
rate_per_unit_weightNorust_decimal::Decimal
Description: Value used by this operation.
percentage_per_productNorust_decimal::Decimal
Description: Value used by this operation.
handling_percentageNorust_decimal::Decimal
Description: Value used by this operation.
rate_change_minNorust_decimal::Decimal
Description: Value used by this operation.
rate_change_maxNorust_decimal::Decimal
Description: Value used by this operation.
total_rate_minNorust_decimal::Decimal
Description: Value used by this operation.
total_rate_maxNorust_decimal::Decimal
Description: Value used by this operation.
conditionsNoJSON
Description: JSON object.
apply_toNostring
Description: Text value.
admin_area_onlyNoboolean
Description: Boolean flag.
customer_rolesNoJSON
Description: JSON object.
days_of_weekNoJSON
Description: JSON object.
time_fromNochrono::NaiveTime
Description: Value used by this operation.
time_toNochrono::NaiveTime
Description: Value used by this operation.
apply_with_coupon_codesNoJSON
Description: JSON object.
apply_with_cart_rulesNoJSON
Description: JSON object.
do_not_apply_with_coupon_codesNoJSON
Description: JSON object.
do_not_apply_with_cart_rulesNoJSON
Description: JSON object.

Response Body

Example 201 response

json
{
  "id": 1,
  "project_id": 1,
  "name": "Example",
  "description": "string",
  "is_active": "string",
  "priority": "string",
  "discard_subsequent": "string",
  "shipping_carriers": [],
  "shipping_methods": [],
  "ignore_free_shipping_promo": "string",
  "calculation_type": "string",
  "base_rate": "string",
  "fixed_rate_per_product": "string",
  "rate_per_unit_weight": "string",
  "percentage_per_product": "string",
  "handling_percentage": "string",
  "rate_change_min": "string",
  "rate_change_max": "string",
  "total_rate_min": "string",
  "total_rate_max": "string",
  "conditions": [],
  "apply_to": "string",
  "admin_area_only": "string",
  "customer_roles": [],
  "days_of_week": "string",
  "time_from": "string",
  "time_to": "string",
  "apply_with_coupon_codes": [],
  "apply_with_cart_rules": [],
  "do_not_apply_with_coupon_codes": [],
  "do_not_apply_with_cart_rules": [],
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z"
}

Errors

500 internal_server_error

Availability

Available in
v0.1.0
Available since
v0.1.0
Implementation
Available
Deprecation
Not specified
Rate limits
Not specified