Skip to content

Apply coupon to customer

POST
/v1/coupons/apply

Apply a coupon to a customer.

ApplyCouponRequest
object
coupon_code
required
Coupon Code
string
customer_id
required
Customer Id
string format: uuid
amount_cents
Any of:
number
amount_currency
Any of:
string
>= 3 characters <= 3 characters
percentage_rate
Any of:
number

Successful Response

AppliedCouponResponse
object
id
required
Id
string format: uuid
coupon_id
required
Coupon Id
string format: uuid
customer_id
required
Customer Id
string format: uuid
amount_cents
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
amount_currency
Any of:
string
percentage_rate
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
frequency
required
Frequency
string
frequency_duration
Any of:
integer
frequency_duration_remaining
Any of:
integer
status
required
Status
string
terminated_at
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Coupon is not active

Unauthorized

Coupon or customer not found

Coupon already applied to this customer

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object