v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Obter desconto

Através dos identificadores da assinatura (subscription_id) e do desconto associado (discount_id) é possível recuperar as informações do desconto.

get/subscriptions/{subscription_id}/discounts/{discount_id}

Path parameters

subscription_idstring required

Código da assinatura.<br>Formato: sub_XXXXXXXXXXXXXXXX.

discount_idstring required

Código do desconto. <br>Formato: dis_XXXXXXXXXXXXXXXX

Response

200

idstring
valueinteger
discount_typestring
statusstring
created_atstring

Example response

{
  "id": "dis_brMgW6KCdmf2dEQ7",
  "value": 10,
  "discount_type": "percentage",
  "status": "active",
  "created_at": "2017-04-04T18:36:43Z",
  "subscription": {
    "id": "sub_o0Jw4WYCMuPNqzGr",
    "code": "09NFPLBZY0",
    "start_at": "2017-04-04T00:00:00Z",
    "interval": "month",
    "interval_count": 1,
    "billing_type": "postpaid",
    "next_billing_at": "2017-05-04T00:00:00Z",
    "payment_method": "credit_card",
    "currency": "BRL",
    "statement_descriptor": "Spotify",
    "installments": 1,
    "status": "active",
    "created_at": "2017-04-04T18:21:17Z",
    "updated_at": "2017-04-04T18:21:17Z"
  }
}