帮助中心

1302 - Coupon redemption request

2019-06-11

Scenario

External system needs to redeem a coupon. It sends request to EZR, EZR will check the status of coupon and return redemption result.


Direction

External system will call EZR

Call path: api/ccoup/coupuse


Core Logic

Support multiple coupons redemption at one time


Request Parameters


Field

Type

Required

Length

Description

ShopCode

string

Yes

16

Shop ID where   redemption happens

SalesNo

string


26

Sales order's   number

SalesMoney

demical



Ticket price   of sales order

CouponNos

string[]

Yes


Number of   redeemed coupon

 

Example Request (JSON)

{

    "ShopCode": "SH000102",

    "SalesNo": "0010",

    "SalesMoney": 990.00,

    "CoupNos": ["0000123001", "0000123002"]

}


Example Return by EZR (JSON)

If a single request consists of several coupons and one of them is not allowed to be redeemed, EZR will return error results.

Failed example :

{

    "Status": false,

    "StatusCode": 2000,

    "Msg": "券0000123001已经被使用",

    "Timestamp": "20150622093101",

    "Sign": "6ECC9BF07C69E80F6D8552FF7B2E7A8FCA2CC80E",

}

Successful example:

{

    "Status": true,

    "StatusCode": 200,

    "Msg": "成功",

    "Timestamp": "20150622093101",

    "Sign": "6ECC9BF07C69E80F6D8552FF7B2E7A8FCA2CC80E",

    "Result": [{

            "CouponNo": "0000123001",

            "Code": 200,

            "Message": "验证成功并消费"},{

            "CouponNo": "0000123002",

            "Code": 200,

            "Message": "验证成功并消费"},

            ],

}


coupon 1019