Skip to main content
Version: 202506

Receive coupons

POST 

/openapi/2025-06/coupons/receive

Assigns specific coupons to a customer.

Request

Bodyrequired

    customer_idstringrequired

    Customer ID

    coupon_idsstring[]required

    Array of coupon IDs to be assigned to the customer

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    receive_statusint32

    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
    items object[]

    List of assigned coupons and their details

  • Array [
  • 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:

    • 1: Already claimed
    • 2: Personal receive limit reached
    • 3: Out of stock
    received_countint32

    The count of times the coupon has been received

  • ]
  • receive_info object[]

    Receive information

  • Array [
  • coupon_idstring

    Coupon ID

    discount_code_idstring

    Discount code ID

    discount_codestring

    Discount code

  • ]