Saltar para o conteúdo principal
GET
/
public
/
api
/
v1
/
billing
/
coupons
/
{couponPublicId}
Get coupon
curl --request GET \
  --url https://api.gennia.ai/public/api/v1/billing/coupons/{couponPublicId} \
  --header 'X-Api-Key: <api-key>'
{
  "active": true,
  "applicablePlans": [
    {
      "billingIntervalMonths": 123,
      "creditsIncluded": 123,
      "currency": "<string>",
      "name": "<string>",
      "priceCents": 123,
      "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "code": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "discountValue": 123,
  "durationMonths": 123,
  "isExhausted": true,
  "isExpired": true,
  "maxUses": 123,
  "name": "<string>",
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "stripeCouponId": "<string>",
  "stripePromotionCodeId": "<string>",
  "timesUsed": 123,
  "updatedAt": "2023-11-07T05:31:56Z",
  "validFrom": "2023-11-07T05:31:56Z",
  "validUntil": "2023-11-07T05:31:56Z"
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

couponPublicId
string<uuid>
obrigatório

Coupon public ID

Resposta

OK

active
boolean
applicablePlans
object[]
code
string
createdAt
string<date-time>
currency
string
discountType
enum<string>
Opções disponíveis:
percentage,
fixed_amount
discountValue
integer<int32>
duration
enum<string>
Opções disponíveis:
once,
repeating,
forever
durationMonths
integer<int32>
isExhausted
boolean
isExpired
boolean
maxUses
integer<int32>
name
string
publicId
string<uuid>
scope
enum<string>
Opções disponíveis:
hub,
plans
stripeCouponId
string
stripePromotionCodeId
string
timesUsed
integer<int32>
updatedAt
string<date-time>
validFrom
string<date-time>
validUntil
string<date-time>