validateDiscount
Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.
All HTTP operationsHTTP 200 valid=false is an invalid quote, not an HTTP error. Customer identity comes only from JWT. The response is a quote with eligibility and stacking diagnostics; it does not reserve a discount or grant checkout admission.
X-Publishable-Key<token>Tenant publishable key for authentication (sent via X-Publishable-Key header)
application/json- body
code*string1 <= lengthorderAmount*number0 < valuecurrency?string3 <= length <= 3market?string1 <= lengthitems?array<>Actual shaped success body
application/json- response
HTTP 200 includes valid=false quotes. Legacy producer also emits internal stacking/digest/customer-source evidence; those fields are not a browser-safe DTO promise. See the recorded owning privacy contradiction before strict public projection changes.
valid*booleancode*stringappliedDiscountId?stringtype?string"percentage""fixed_amount""free_shipping""tiered"discountAmount*numberfreeShipping?booleanreason?stringreasonCode?string"discount_code_not_found""discount_not_started""discount_expired""discount_usage_limit""discount_per_customer_limit""discount_customer_required""discount_first_order_only""discount_customer_not_eligible""discount_customer_excluded""discount_items_required""discount_product_not_eligible""discount_product_excluded""discount_min_order_amount""discount_currency_scope_required""discount_allocation_method_unsupported""market_not_found"[key: string]?anyExamples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.
curl -X POST 'https://api.01.software/api/discounts/validate' \ -H 'Content-Type: application/json' \ -d '{ "code": "string", "orderAmount": 1}'{ "valid": true, "code": "string", "appliedDiscountId": "string", "type": "percentage", "discountAmount": 0, "freeShipping": true, "reason": "string", "reasonCode": "discount_code_not_found"}