ClavianAPI errors
All error codes

409 Conflict

Discount limit reached

Code
discount_limit_reached
Status
409 Conflict
Type
https://errors.clavian.io/discount-limit-reached

What it means

The discount has been redeemed as many times as it may be, and another order took its last use first.

What to do

Quote the cart again without the discount, show the new total, and let the person decide.

Example

The API answers with status 409 and this body, as application/problem+json. A detail may be added, saying what went wrong this time; it is for people, and changes.

{
  "type": "https://errors.clavian.io/discount-limit-reached",
  "title": "Discount limit reached",
  "status": 409,
  "code": "discount_limit_reached",
  "requestId": "req_01k5znw4hmfay8vvr14d2pf2db"
}

Endpoints that return it

No endpoint in the OpenAPI document names it yet. It is part of the contract already, so a client can handle it before an endpoint sends it.