Skip to main content
POST
/
applied_coupons
Apply a coupon to a customer
curl --request POST \
  --url https://core.nozle.app/api/v1/applied_coupons \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "applied_coupon": {
    "external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
    "coupon_code": "startup_deal",
    "frequency": "recurring",
    "frequency_duration": 3,
    "amount_cents": 2000,
    "amount_currency": "EUR",
    "percentage_rate": null
  }
}
'
{
  "applied_coupon": {
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "lago_coupon_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "coupon_code": "startup_deal",
    "coupon_name": "Startup Deal",
    "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
    "status": "active",
    "frequency": "recurring",
    "created_at": "2022-04-29T08:59:51Z",
    "coupon_status": "active",
    "coupon_deleted_at": "2022-04-29T08:59:51Z",
    "amount_cents": 2000,
    "amount_cents_remaining": 50,
    "amount_currency": "EUR",
    "percentage_rate": null,
    "frequency_duration": 3,
    "frequency_duration_remaining": 1,
    "expiration_at": "2022-04-29T08:59:51Z",
    "terminated_at": "2022-04-29T08:59:51Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Apply coupon payload

applied_coupon
object
required

Response

Coupon applied

applied_coupon
object
required