Cupons

Consultar um cupom

GET /v1/coupons/{couponId}

GET /v1/coupons/{couponId}

Obtém os detalhes completos de um cupom.

Requisição

curl "https://api.selectwin.io/v1/coupons/dis_01hqzvabc" \
  -H "SelectKey: sk_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ"

O couponId aceita os prefixos dis_ e coup_ (cupons legados).

Resposta - 200 OK

{
  "id": "dis_01hqzvabc",
  "name": "Black Friday 25%",
  "code": "BLACKFRIDAY25",
  "type": "percentage",
  "value": 25,
  "enabled": true,
  "minCartAmount": 10000,
  "maxCartAmount": null,
  "minCartItems": null,
  "maxCartItems": null,
  "usageLimit": 100,
  "usageQuantity": 0,
  "limitOneUsePerCustomer": true,
  "isCumulative": false,
  "initDate": "2026-04-01T00:00:00.000Z",
  "endDate": "2026-04-30T23:59:59.000Z",
  "allowedItemIds": null,
  "allowedCustomerIds": null,
  "scope": "firstCharge",
  "recurringCycles": null,
  "createdAt": "2026-04-12T17:56:33.000Z",
  "updatedAt": "2026-04-12T17:56:33.000Z"
}

Nota: Root level, objeto completo, sem merchant nem _links.

Atributos da Resposta

Mesmos do Create (ver Create.md).

Respostas de Erro

error.codeHTTPQuando
couponNotFound404Nenhum cupom com o couponId informado.

Melhores Práticas

  • Use para verificar usageQuantity antes de promover o cupom.

How is this guide?

On this page