Version: 202506
Receive coupons
POST/openapi/2025-06/coupons/receive
Assigns specific coupons to a customer.
Request
- application/json
- Body
- Example
Bodyrequired
customer_idstringrequired
Customer ID
coupon_idsstring[]required
Array of coupon IDs to be assigned to the customer
{
"customer_id": "string",
"coupon_ids": [
"string"
]
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
1: Successfully received2: Not eligible to receive (excluding not purchased/not subscribed)3: Reached receive limit (total cannot exceed 100)4: Reached receive limit (exceeds backend configuration)5: Expired6: Coupon does not exist7: Already received8: Insufficient stock9: Failed to receive (concurrency lock failure or third-party service failure)10: Not started11: Not subscribed12: Not purchased13: Not allowed to receive repurchase coupon- Array [
1: Already claimed2: Personal receive limit reached3: Out of stock- ]
- Array [
- ]
codestring
error code
messagestring
error message
data object
receive_statusint32
Operation status code:
items object[]
List of assigned coupons and their details
idstring
The ID of the assigned coupon
stockint32
The available stock of the coupon, -1 indicates unlimited stock
once_per_customerint32
Whether usable once per customer
coupon_statusint32
The current receive status of the coupon:
received_countint32
The count of times the coupon has been received
receive_info object[]
Receive information
coupon_idstring
Coupon ID
discount_code_idstring
Discount code ID
discount_codestring
Discount code
{
"code": "string",
"message": "string",
"data": {
"receive_status": 0,
"items": [
{
"id": "string",
"stock": 0,
"once_per_customer": 0,
"coupon_status": 0,
"received_count": 0
}
],
"receive_info": [
{
"coupon_id": "string",
"discount_code_id": "string",
"discount_code": "string"
}
]
}
}