6. API get redeem

  1. Point accumulation history

URL: https://apiring.antbuddy.com/history-point

Method: GET

Content-Type: application/json

Parameters

Type

Cat ch set c

Explain

createdAtRangeFrom

number

Start time

createdAtRangeTo

number

End time

phone

String

Customer phone number

email

String

Customer email

page

number

Page number, maximum 20 records per page

Results returned:

HTTP Response Code: 200

Response:

[{

"type": 2, // exchange type

"score": 10, // number of points used to redeem gifts

"status": 1, // redemption status (success: 1, failure: 0)

"gift": {

"code": "DAUMAY01", // gift code

"name": "Locomotive", // name of gift

"score": 10, // number of points to redeem gifts

"id": "64d9f2ec2b3ba308b322c782"

},

"contact": {

"phones": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a8",

"value": "0867123456"

}

],

"name": "Garnacho",

"emails": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a9",

"value": "[email protected]"

}

],

"customerId": 475, // contact id on CRM

"id": "64db290a7796fe24bfe876a7"

},

"org": "62c10674cbe832bc9245a5b8",

"createdAt": 1692085265818, // redemption time

"id": "64db2c11cbad5f4fdd254567" }]

  1. Accumulate points

URL: https://apiring.antbuddy.com/redeem

Method: POST

Content-Type: application/json

Parameters

Type

Required

Explain

code

string

AND

Gift code code

data

object

AND

{

“email”: “[email protected]”, // email of customer redeeming gift “phone”: “023232” // phone number of customer redeeming gift }

Results returned: HTTP Response Code: 200

Response:

{

"success": 1,

}

Last updated