Errors
The Price Rules API uses conventional HTTP response codes to indicate errors as well as custom error codes, described below.
Example API Response Error
{
"errors": [
{
"message": "Required field missing or empty: product_selection",
"code": "04-6",
"type": "price_rules.required_field_missing"
}
]
}
API Error Codes
Error Code | Error Type |
---|---|
00-1 | authentication.failed |
00-2 | authorization.invalid_scopes |
04-0 | unexpected |
04-1 | price_rules.invalid_field |
04-2 | price_rules.invalid_value |
04-3 | price_rules.invalid_payload |
04-4 | price_rules.invalid_selection_type |
04-5 | price_rules.shop_not_provided |
04-6 | price_rules.required_field_missing |
04-7 | price_rules.shop_not_found |
04-8 | price_rules.shop_not_active |
04-9 | price_rules.ruleset_not_found |
04-10 | price_rules.invalid_rule |
04-11 | price_rules.invalid_selection_data |
04-12 | price_rules.order_condition_not_found |
04-13 | price_rules.shop_identifier_mismatch |
04-14 | price_rules.ruleset_already_exists |
04-15 | price_rules.order_condition_already_exists |
04-16 | price_rules.discount_code_not_found |
04-17 | price_rules.discount_code_already_exists |
04-18 | price_rules.rule_not_found |
04-19 | price_rules.incorrect_api_for_resource |
04-20 | price_rules.rule_already_exists |
04-21 | price_rules.page_not_found |
04-22 | price_rules.invalid_filter_type |
04-23 | price_rules.duplicate_rule_external_ids |
04-24 | price_rules.mass_insert_exception |
04-25 | price_rules.too_many_rules_exception |
04-26 | price_rules.missing_rules_exception |
04-27 | price_rules.forbidden |
04-28 | price_rules.customer_not_found |
04-29 | price_rules.required_variants_not_found_in_cart |
04-30 | price_rules.discount_codes_not_enabled |
04-31 | price_rules.invalid_discount_codes_status |