Receive Coupons

Enables assigning specific coupons to a customer.

🔒

Requires price_rules access scope. More access scope

The Receive Coupons API enables assigning specific coupons to a customer.

This API is especially useful for:

  1. Distributing promotional coupons to targeted customers.
  2. Managing coupon assignments for specific users.
  3. Automating coupon distribution in bulk.

Request Parameters

Public Request Parameters

📘

Query Parameters

ParameterTypeRequiredDescriptionExample
customer_idstringYesCustomer's unique ID to assign the coupons"cus_123456789"
coupon_idsarray of stringsYesArray of coupon IDs to be assigned to the customer["cpn_1", "cpn_2"]

Response Explanation

Public Response Parameters

📘

Successful Response

Parameter

Type

Example

Description

code

string

"success"

Status code of the response

message

string

Descriptive message of the response

data.receive_status

int32

1

Operation status code

  • 1: Successfully received
  • 2: 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: Expired
  • 6: Coupon does not exist
  • 7: Already received
  • 8: Insufficient stock
  • 9: Failed to receive (concurrency lock failure or third-party service failure)
  • 10: Not started
  • 11: Not subscribed
  • 12: Not purchased
  • 13: Not allowed to receive repurchase coupon

data.items.id

string

"cpn_123"

The ID of the assigned coupon

data.items.stock

int32

100

The available stock of the coupon (-1 indicates unlimited)

data.items.
once_per_customer

int32

1

Whether coupon can be received only once per customer

data.items.
coupon_status

int32

1

The current status of the coupon

  • 1: Received
  • 2: Personal receive limit reached
  • 3: No stock available
data.items.
received_count

int32

3

The count of times the coupon has been received

data.items.
receive_info. 
coupon_id

string

"cpn_123"

Coupon ID in receive info

data.items.receive_info. discount_code_id

string

"dsc_123"

Discount code ID

data.items.receive_info. discount_code

string

"SUMMER20"

Actual discount code

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!