Use these endpoints to offer cash on delivery in a market. Read requests require read_markets; changes require write_markets. Start with simple mode for one market-wide rule, or use advanced mode when destinations need different availability, fees, or order-value conditions.
Choose how cash on delivery applies#
Simple mode#
Use simple mode when one cash-on-delivery rule should cover the whole market. The market settings decide whether the option is available, how its fee is calculated, and which order values qualify.
Advanced mode#
Use advanced mode when availability or fees differ by destination. Checkout first looks for a subdivision zone, then a country zone, and finally the default zone. A disabled matching zone blocks COD; checkout does not fall back to a broader zone. A non-default zone selects countries or subdivisions; the default zone has no regions and covers destinations left unmatched.
Product eligibility and unavailable options#
Read the cod-rules list response for supported fields, operators, priorities and max_rules. Priority 1 runs first; equal priorities run from oldest to newest. The first rule matching any product wins. A block rule makes COD unavailable. An allow rule still requires COD to be enabled and the destination and order-value checks to pass. When no product rule matches, those checks still apply.
Use unavailable_display to hide an unavailable COD option or show its reason. unavailable_message accepts up to 200 characters after trimming surrounding whitespace. Send both fields when replacing settings: omission resets the display to hide and clears the message. Switching COD off for the market hides it regardless of these preferences.
How order values and fees are calculated#
Minimum, maximum, fee-waiver, and percentage-fee rules use the merchandise subtotal after every merchandise discount. Shipping, tax, duties, checkout fees, and the COD fee are not part of that subtotal. Minimum and maximum values include the boundary itself. The fee is waived when the subtotal reaches or exceeds the waiver amount.
A fixed fee uses the amount saved for the order currency. A percentage fee uses the discounted merchandise subtotal. After the fee is resolved, Tringify applies the selected market tax class and records the fee, tax class, and HSN or SAC code in the order pricing snapshot.
Endpoints#
Get COD settings
Read the cash-on-delivery configuration for a market.
The response includes unavailable_display and unavailable_message; keep both when editing other settings. It also tells you whether cash on delivery is enabled, whether the market uses one simple rule or destination-based zones, and how its fee and order-value conditions are configured. Amount maps are keyed by the market's currency codes. Threshold fields remain present when their corresponding toggle is off, but they do not affect checkout. Supplied inactive amounts still need valid currency codes, nonnegative values, supported precision and valid ranges.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404COD_SETTINGS_NOT_FOUNDCash-on-delivery settings have not been created for this market.
-
404NOT_FOUNDThe market does not exist in this store.
Update COD settings
Choose the COD mode and save its market-wide rules.
Send the complete settings object. is_enabled controls whether COD can be offered in either mode. In simple mode these rules apply throughout the market. In advanced mode checkout uses COD zones instead. Simple fee and threshold amounts may be incomplete while COD is disabled or Advanced mode is selected; supplied values still require valid currencies, precision and ranges. Enabling Simple COD requires complete valid amounts for every enabled rule. Zone writes always require their own complete fee and threshold configuration. Changing modes requires the confirmation token returned by the first request. An unchanged request leaves the settings untouched and publishes no webhook; a successful change publishes cod_settings/update.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
mode
required
|
string |
Use |
is_enabled
required
|
boolean |
Whether checkout may offer cash on delivery in this market. |
fee_type
required
|
string |
Use |
percent_value
|
string|null |
Percentage of discounted merchandise subtotal when |
fee_amounts
|
object |
Positive decimal-string COD fees for every market currency when |
min_order_enabled
required
|
boolean |
Whether checkout requires a minimum discounted merchandise subtotal. |
min_order_amounts
|
object |
Inclusive minimum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero minimum cannot exceed the corresponding nonzero maximum. Completeness is required when mode is simple and is_enabled is true. Otherwise this Simple-mode value may be omitted or incomplete; a missing percentage must be null, not an empty string. Supplied values must still satisfy the stated currency, precision and range rules. |
max_order_enabled
required
|
boolean |
Whether checkout enforces a maximum discounted merchandise subtotal. |
max_order_amounts
|
object |
Inclusive maximum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. Equal minimum and maximum values are allowed. Completeness is required when mode is simple and is_enabled is true. Otherwise this Simple-mode value may be omitted or incomplete; a missing percentage must be null, not an empty string. Supplied values must still satisfy the stated currency, precision and range rules. |
waive_fee_enabled
required
|
boolean |
Whether qualifying orders receive cash on delivery without its fee. |
waive_fee_over_amounts
|
object |
Subtotal at or above which the fee is waived. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero waiver cannot exceed the corresponding nonzero maximum. Completeness is required when mode is simple and is_enabled is true. Otherwise this Simple-mode value may be omitted or incomplete; a missing percentage must be null, not an empty string. Supplied values must still satisfy the stated currency, precision and range rules. |
tax_class_id
|
uuid|null |
A tax class assigned to this market. Its rate is applied to the resolved COD fee. |
hsn_code
|
string |
HSN or SAC code recorded with the COD fee for tax reporting. |
confirmed
|
boolean |
Set to |
unavailable_display
|
string |
Use hide or show_reason when COD is unavailable. |
unavailable_message
|
string |
Shopper-facing explanation when COD is unavailable. Leading and trailing whitespace is trimmed; at most 200 characters are accepted. Omission clears the saved message. |
confirmation_token
|
string |
Token returned by |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400STORE_API_INVALID_REQUEST_BODYThe request body is not valid JSON.
-
400SETTINGS_MODE_INVALIDmodeis notsimpleoradvanced. -
400COD_FEE_TYPE_INVALIDfee_typeis notfree,fixed, orpercent. -
400INVALID_INPUTA required amount is missing or nonpositive, an amount uses an unassigned currency, or saved thresholds contradict each other.
-
400CHECKOUT_FEE_PERCENT_RANGEThe COD percentage is missing, is not greater than 0 and at most 100, or exceeds six fractional digits.
-
400CHECKOUT_AMOUNT_TOO_LARGEAn amount exceeds 9999999999999999.9999.
-
400CHECKOUT_AMOUNT_TOO_PRECISEAn amount cannot be represented exactly at its currency's amount precision.
-
400DUTY_HSN_CODE_TOO_LONGhsn_codeexceeds the configured length limit. -
400TAX_CLASS_NOT_IN_MARKETThe selected tax class does not belong to this market.
-
400MARKET_CONFIRMATION_INVALIDThe confirmation token is missing, expired, or does not match this mode change.
-
409CONFIRMATION_REQUIREDChanging between simple and advanced mode requires confirmation.
-
403STORE_COMMERCE_TEST_GATEWAY_ONLYis_enabledis true on a development or transfer store. Those stores take payments through the test gateway only; save the settings withis_enabledfalse. -
404NOT_FOUNDThe market does not exist in this store.
Get COD zone limits
Read the limits used when creating and editing COD zones.
Use these values to validate zone names, descriptions, HSN or SAC codes, and the number of zones before sending a write. The limits come from the same contract enforced by the service.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404MARKET_NOT_FOUNDNo market with this id exists in the store.
List COD zones
List the destination rules configured for advanced mode.
Zones are returned in matching priority order. A non-default zone covers its saved countries or subdivisions. The default zone catches market destinations that no more specific zone covers. A disabled matching zone blocks COD; it does not fall back to a broader zone.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404MARKET_NOT_FOUNDNo market with this id exists in the store.
Create a COD zone
Add a destination-specific or default COD rule.
Choose either a country or subdivision scope, or create a default zone with no regions. The first zone respects is_default: false; it is not automatically made the default. Without a matching zone or an explicit default, COD is unavailable for the destination. Every zone has its own availability, fee, minimum, maximum, waiver, and fee-tax configuration. Countries must belong to the market, subdivisions must belong to a selected country, and zone names must be unique within the market. A successful create publishes cod_zones/create.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
A name merchants can recognize when managing the zone. |
description
|
string |
Optional note describing when this rule should be used. |
countries
|
array<string> |
Country codes from this market covered by the zone. Leave empty for the default zone. |
subdivisions
|
array<string> |
Canonical subdivision codes covered by the zone. Each subdivision must belong to a selected country. |
is_default
required
|
boolean |
Whether this zone covers market destinations not matched by a more specific zone. Explicit opt-in, including for the first zone; when true, countries and subdivisions must be empty. |
is_enabled
required
|
boolean |
Whether checkout may offer cash on delivery when this zone matches. |
fee_type
required
|
string |
Use |
percent_value
|
string|null |
Percentage of discounted merchandise subtotal when |
fee_amounts
|
object |
Positive decimal-string COD fees for every market currency when |
min_order_enabled
required
|
boolean |
Whether checkout requires a minimum discounted merchandise subtotal. |
min_order_amounts
|
object |
Inclusive minimum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero minimum cannot exceed the corresponding nonzero maximum. |
max_order_enabled
required
|
boolean |
Whether checkout enforces a maximum discounted merchandise subtotal. |
max_order_amounts
|
object |
Inclusive maximum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. Equal minimum and maximum values are allowed. |
waive_fee_enabled
required
|
boolean |
Whether qualifying orders receive cash on delivery without its fee. |
waive_fee_over_amounts
|
object |
Subtotal at or above which the fee is waived. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero waiver cannot exceed the corresponding nonzero maximum. |
tax_class_id
|
uuid|null |
A tax class assigned to this market. Its rate is applied to the resolved COD fee. |
hsn_code
|
string |
HSN or SAC code recorded with the COD fee for tax reporting. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400STORE_API_INVALID_REQUEST_BODYThe request body is not valid JSON.
-
400COD_ZONE_NAME_REQUIREDnameis empty. -
400COD_ZONE_NAME_TOO_LONGnameexceeds the configured limit. -
400COD_ZONE_DESCRIPTION_TOO_LONGdescriptionexceeds the configured limit. -
400ZONE_DEFAULT_NO_REGIONSA default zone cannot also select countries or subdivisions.
-
400ZONE_NEEDS_REGIONA non-default zone must select at least one country or subdivision.
-
400ZONE_COUNTRY_INVALIDA selected country does not belong to this market.
-
400ZONE_SUBDIVISION_INVALIDA subdivision code is invalid or does not belong to this market.
-
400ZONE_SUBDIVISION_NOT_IN_COUNTRYA selected subdivision does not belong to one of the zone's selected countries.
-
400COD_FEE_TYPE_INVALIDfee_typeis notfree,fixed, orpercent. -
400INVALID_INPUTA required amount is missing or nonpositive, an amount uses an unassigned currency, or saved thresholds contradict each other.
-
400CHECKOUT_FEE_PERCENT_RANGEThe COD percentage is missing, is not greater than 0 and at most 100, or exceeds six fractional digits.
-
400CHECKOUT_AMOUNT_TOO_LARGEAn amount exceeds 9999999999999999.9999.
-
400CHECKOUT_AMOUNT_TOO_PRECISEAn amount cannot be represented exactly at its currency's amount precision.
-
400DUTY_HSN_CODE_TOO_LONGhsn_codeexceeds the configured length limit. -
400TAX_CLASS_NOT_IN_MARKETThe selected tax class does not belong to this market.
-
404NOT_FOUNDThe market does not exist in this store.
-
400COD_ZONE_LIMIT_REACHEDThe market already has the maximum number of COD zones.
-
409COD_ZONE_NAME_DUPLICATEAnother COD zone in this market already uses this name.
Get a COD zone
Read one destination rule and its complete fee configuration.
Use the returned values to populate an edit form or inspect the exact rule checkout will consider for this zone.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
COD zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404NOT_FOUNDThe market or COD zone does not exist in this store.
Update a COD zone
Replace the editable definition of a COD zone.
Send the complete zone definition you want to keep. The same geographic, currency, threshold, and tax-class rules used during creation apply here. To make a zone the default, send is_default: true with empty countries and subdivisions arrays. This clears the previous default. An unchanged request publishes no webhook; a successful change publishes cod_zones/update.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
COD zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
A name merchants can recognize when managing the zone. |
description
|
string |
Optional note describing when this rule should be used. |
countries
|
array<string> |
Country codes from this market covered by the zone. Leave empty for the default zone. |
subdivisions
|
array<string> |
Canonical subdivision codes covered by the zone. Each subdivision must belong to a selected country. |
is_default
required
|
boolean |
Whether this zone covers market destinations not matched by a more specific zone. Explicit opt-in, including for the first zone; when true, countries and subdivisions must be empty. |
is_enabled
required
|
boolean |
Whether checkout may offer cash on delivery when this zone matches. |
fee_type
required
|
string |
Use |
percent_value
|
string|null |
Percentage of discounted merchandise subtotal when |
fee_amounts
|
object |
Positive decimal-string COD fees for every market currency when |
min_order_enabled
required
|
boolean |
Whether checkout requires a minimum discounted merchandise subtotal. |
min_order_amounts
|
object |
Inclusive minimum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero minimum cannot exceed the corresponding nonzero maximum. |
max_order_enabled
required
|
boolean |
Whether checkout enforces a maximum discounted merchandise subtotal. |
max_order_amounts
|
object |
Inclusive maximum subtotal keyed by currency code. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. Equal minimum and maximum values are allowed. |
waive_fee_enabled
required
|
boolean |
Whether qualifying orders receive cash on delivery without its fee. |
waive_fee_over_amounts
|
object |
Subtotal at or above which the fee is waived. When enabled, provide a positive amount for every market currency using the same precision and maximum as fee_amounts. A saved nonzero waiver cannot exceed the corresponding nonzero maximum. |
tax_class_id
|
uuid|null |
A tax class assigned to this market. Its rate is applied to the resolved COD fee. |
hsn_code
|
string |
HSN or SAC code recorded with the COD fee for tax reporting. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400STORE_API_INVALID_REQUEST_BODYThe request body is not valid JSON.
-
400COD_ZONE_NAME_REQUIREDnameis empty. -
400COD_ZONE_NAME_TOO_LONGnameexceeds the configured limit. -
400COD_ZONE_DESCRIPTION_TOO_LONGdescriptionexceeds the configured limit. -
400ZONE_DEFAULT_NO_REGIONSA default zone cannot also select countries or subdivisions.
-
400ZONE_NEEDS_REGIONA non-default zone must select at least one country or subdivision.
-
400ZONE_COUNTRY_INVALIDA selected country does not belong to this market.
-
400ZONE_SUBDIVISION_INVALIDA subdivision code is invalid or does not belong to this market.
-
400ZONE_SUBDIVISION_NOT_IN_COUNTRYA selected subdivision does not belong to one of the zone's selected countries.
-
400COD_FEE_TYPE_INVALIDfee_typeis notfree,fixed, orpercent. -
400INVALID_INPUTA required amount is missing or nonpositive, an amount uses an unassigned currency, or saved thresholds contradict each other.
-
400CHECKOUT_FEE_PERCENT_RANGEThe COD percentage is missing, is not greater than 0 and at most 100, or exceeds six fractional digits.
-
400CHECKOUT_AMOUNT_TOO_LARGEAn amount exceeds 9999999999999999.9999.
-
400CHECKOUT_AMOUNT_TOO_PRECISEAn amount cannot be represented exactly at its currency's amount precision.
-
400DUTY_HSN_CODE_TOO_LONGhsn_codeexceeds the configured length limit. -
400TAX_CLASS_NOT_IN_MARKETThe selected tax class does not belong to this market.
-
404NOT_FOUNDThe market does not exist in this store.
-
400COD_ZONE_DEFAULT_UNSET_LOCKEDThe only zone cannot stop being the default zone.
-
409COD_ZONE_NAME_DUPLICATEAnother COD zone in this market already uses this name.
Delete a COD zone
Remove a destination rule from the market.
The only zone cannot be deleted. A default zone must be replaced as the default before it can be removed. Existing orders keep the COD fee and tax snapshots recorded when they were placed. A successful deletion publishes cod_zones/delete.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
COD zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400COD_ZONE_ONLY_DELETE_LOCKEDThe only COD zone cannot be deleted.
-
400COD_ZONE_DEFAULT_DELETE_LOCKEDChoose another default zone before deleting this one.
-
404NOT_FOUNDThe market or COD zone does not exist in this store.
List product COD rules
Read product eligibility rules and the choices supported by the rule editor.
The response contains rules, max_rules, rule_fields, actions and priorities. Use the returned field/operator catalog, including requires_value, when building an editor. The example shows illustrative records and current choices; use the live response for limits. Rules run by ascending priority, with equal priorities evaluated from oldest to newest. The first rule matching any product decides. An allow rule still requires COD to be enabled and destination and order-value checks to pass. No matching product rule leaves those checks in effect.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404NOT_FOUNDMarket or rule not found in this store.
Create a product COD rule
Add an allow or block condition for cash on delivery.
Send the complete rule definition using a field and operator from the list response. Title conditions use contains or not_contains. For tag, category, vendor and brand comparisons, value is the resource ID as a string and must belong to this store. Presence checks do not require a value. include_subcategories applies to category conditions. The response returns the saved rule, including its ID and timestamps. Store and market ownership come from the token and URL.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
priority
required
|
integer |
Priority from 1 through 10; lower is evaluated first. Equal priorities are evaluated from oldest to newest. |
action
required
|
string |
Use allow or block. |
field
required
|
string |
A field from the list response rule_fields catalog. |
operator
required
|
string |
An operator supported by the selected field. For title, use contains or not_contains. |
value
|
string|null |
Condition value required by the selected operator. |
include_subcategories
|
boolean |
Include descendant categories for a category condition. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404NOT_FOUNDMarket or rule not found in this store.
-
400INVALID_INPUTInvalid action or priority.
-
400STORE_API_INVALID_REQUEST_BODYRequest body must be a JSON object.
-
400COLLECTION_RULE_FIELD_INVALIDRule field is not valid.
-
400COLLECTION_RULE_OPERATOR_INVALIDRule operator is not valid for the selected field.
-
400COLLECTION_RULE_VALUE_REQUIREDThis rule operator requires a value.
-
400COLLECTION_RULE_SUBCATEGORIES_NOT_ALLOWEDInclude_subcategories is only valid for category rules.
-
400COLLECTION_RULE_TAG_ID_INVALIDTag value is not a valid integer id.
-
400COLLECTION_RULE_CATEGORY_ID_INVALIDCategory value is not a valid integer id.
-
400COLLECTION_RULE_VENDOR_ID_INVALIDVendor value is not a valid integer id.
-
400COLLECTION_RULE_BRAND_ID_INVALIDBrand value is not a valid integer id.
-
400COLLECTION_RULE_TITLE_TOO_LONGTitle rule value exceeds the contract max length.
-
400COLLECTION_RULE_TAG_NOT_FOUNDReferenced tag does not exist in this store.
-
400COLLECTION_RULE_CATEGORY_NOT_FOUNDReferenced category does not exist in this store.
-
400COLLECTION_RULE_VENDOR_NOT_FOUNDReferenced vendor does not exist in this store.
-
400COLLECTION_RULE_BRAND_NOT_FOUNDReferenced brand does not exist in this store.
-
400COD_RULE_LIMIT_REACHEDThe market already has the maximum number of COD rules.
Update a product COD rule
Replace a saved product condition and its priority.
Send the complete rule definition using a field and operator from the list response. Title conditions use contains or not_contains. For tag, category, vendor and brand comparisons, value is the resource ID as a string and must belong to this store. Presence checks do not require a value. include_subcategories applies to category conditions. The response returns the saved rule, including its ID and timestamps. Store and market ownership come from the token and URL.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
ruleId
required
|
uuid |
COD rule id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
priority
required
|
integer |
Priority from 1 through 10; lower is evaluated first. Equal priorities are evaluated from oldest to newest. |
action
required
|
string |
Use allow or block. |
field
required
|
string |
A field from the list response rule_fields catalog. |
operator
required
|
string |
An operator supported by the selected field. For title, use contains or not_contains. |
value
|
string|null |
Condition value required by the selected operator. |
include_subcategories
|
boolean |
Include descendant categories for a category condition. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404NOT_FOUNDMarket or rule not found in this store.
-
400INVALID_INPUTInvalid action or priority.
-
400STORE_API_INVALID_REQUEST_BODYRequest body must be a JSON object.
-
400COLLECTION_RULE_FIELD_INVALIDRule field is not valid.
-
400COLLECTION_RULE_OPERATOR_INVALIDRule operator is not valid for the selected field.
-
400COLLECTION_RULE_VALUE_REQUIREDThis rule operator requires a value.
-
400COLLECTION_RULE_SUBCATEGORIES_NOT_ALLOWEDInclude_subcategories is only valid for category rules.
-
400COLLECTION_RULE_TAG_ID_INVALIDTag value is not a valid integer id.
-
400COLLECTION_RULE_CATEGORY_ID_INVALIDCategory value is not a valid integer id.
-
400COLLECTION_RULE_VENDOR_ID_INVALIDVendor value is not a valid integer id.
-
400COLLECTION_RULE_BRAND_ID_INVALIDBrand value is not a valid integer id.
-
400COLLECTION_RULE_TITLE_TOO_LONGTitle rule value exceeds the contract max length.
-
400COLLECTION_RULE_TAG_NOT_FOUNDReferenced tag does not exist in this store.
-
400COLLECTION_RULE_CATEGORY_NOT_FOUNDReferenced category does not exist in this store.
-
400COLLECTION_RULE_VENDOR_NOT_FOUNDReferenced vendor does not exist in this store.
-
400COLLECTION_RULE_BRAND_NOT_FOUNDReferenced brand does not exist in this store.
Delete a product COD rule
Remove one cash-on-delivery product condition.
The rule must belong to the market and store identified by the URL and token. A successful response contains deleted: true. Remaining rules keep their priorities.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
ruleId
required
|
uuid |
COD rule id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404NOT_FOUNDMarket or rule not found in this store.
Webhook events#
Subscribe to these events when your app keeps a local copy of cash-on-delivery settings or zones. Settings updates contain the complete saved configuration. Zone create and update events contain the complete zone; zone delete identifies the removed zone. Requests that make no effective change do not publish an event.
Cash on delivery settings updated
Fired when a market's cash-on-delivery mode, availability, fee, threshold, or fee-tax settings change.
Payload fields
| Field | Type | Description |
|---|---|---|
cod_settings.id |
string |
Always present |
cod_settings.market_id |
string |
Selectable in the Payload builder |
cod_settings.mode |
string |
Selectable in the Payload builder |
cod_settings.is_enabled |
boolean |
Selectable in the Payload builder |
cod_settings.fee_type |
string |
Selectable in the Payload builder |
cod_settings.percent_value |
string |
Selectable in the Payload builder |
cod_settings.fee_amounts |
object |
Selectable in the Payload builder |
cod_settings.min_order_enabled |
boolean |
Selectable in the Payload builder |
cod_settings.min_order_amounts |
object |
Selectable in the Payload builder |
cod_settings.max_order_enabled |
boolean |
Selectable in the Payload builder |
cod_settings.max_order_amounts |
object |
Selectable in the Payload builder |
cod_settings.waive_fee_enabled |
boolean |
Selectable in the Payload builder |
cod_settings.waive_fee_over_amounts |
object |
Selectable in the Payload builder |
cod_settings.tax_class_id |
string |
Selectable in the Payload builder |
cod_settings.hsn_code |
string |
Selectable in the Payload builder |
cod_settings.unavailable_display |
string |
Selectable in the Payload builder |
cod_settings.unavailable_message |
string |
Selectable in the Payload builder |
cod_settings.created_at |
string |
Selectable in the Payload builder |
cod_settings.updated_at |
string |
Selectable in the Payload builder |
Cash on delivery zone created
Fired when a cash-on-delivery zone is created in a market.
Payload fields
| Field | Type | Description |
|---|---|---|
cod_zone.id |
string |
Always present |
cod_zone.market_id |
string |
Selectable in the Payload builder |
cod_zone.name |
string |
Selectable in the Payload builder |
cod_zone.description |
string |
Selectable in the Payload builder |
cod_zone.countries |
array |
Selectable in the Payload builder |
cod_zone.subdivisions |
array |
Selectable in the Payload builder |
cod_zone.is_default |
boolean |
Selectable in the Payload builder |
cod_zone.priority |
integer |
Selectable in the Payload builder |
cod_zone.is_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.fee_type |
string |
Selectable in the Payload builder |
cod_zone.percent_value |
string |
Selectable in the Payload builder |
cod_zone.fee_amounts |
object |
Selectable in the Payload builder |
cod_zone.min_order_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.min_order_amounts |
object |
Selectable in the Payload builder |
cod_zone.max_order_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.max_order_amounts |
object |
Selectable in the Payload builder |
cod_zone.waive_fee_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.waive_fee_over_amounts |
object |
Selectable in the Payload builder |
cod_zone.tax_class_id |
string |
Selectable in the Payload builder |
cod_zone.hsn_code |
string |
Selectable in the Payload builder |
cod_zone.created_at |
string |
Selectable in the Payload builder |
cod_zone.updated_at |
string |
Selectable in the Payload builder |
Cash on delivery zone updated
Fired when a cash-on-delivery zone changes.
Payload fields
| Field | Type | Description |
|---|---|---|
cod_zone.id |
string |
Always present |
cod_zone.market_id |
string |
Selectable in the Payload builder |
cod_zone.name |
string |
Selectable in the Payload builder |
cod_zone.description |
string |
Selectable in the Payload builder |
cod_zone.countries |
array |
Selectable in the Payload builder |
cod_zone.subdivisions |
array |
Selectable in the Payload builder |
cod_zone.is_default |
boolean |
Selectable in the Payload builder |
cod_zone.priority |
integer |
Selectable in the Payload builder |
cod_zone.is_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.fee_type |
string |
Selectable in the Payload builder |
cod_zone.percent_value |
string |
Selectable in the Payload builder |
cod_zone.fee_amounts |
object |
Selectable in the Payload builder |
cod_zone.min_order_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.min_order_amounts |
object |
Selectable in the Payload builder |
cod_zone.max_order_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.max_order_amounts |
object |
Selectable in the Payload builder |
cod_zone.waive_fee_enabled |
boolean |
Selectable in the Payload builder |
cod_zone.waive_fee_over_amounts |
object |
Selectable in the Payload builder |
cod_zone.tax_class_id |
string |
Selectable in the Payload builder |
cod_zone.hsn_code |
string |
Selectable in the Payload builder |
cod_zone.created_at |
string |
Selectable in the Payload builder |
cod_zone.updated_at |
string |
Selectable in the Payload builder |
Cash on delivery zone deleted
Fired when a cash-on-delivery zone is deleted.
Payload fields
| Field | Type | Description |
|---|---|---|
cod_zone.id |
string |
Always present |
cod_zone.market_id |
string |
Selectable in the Payload builder |
cod_zone.name |
string |
Selectable in the Payload builder |