Point

Point APIs reference

Summary

Create transactions involving SkyPoints, including point accrual and redemption

Methods


Point Redemption

POST https://api.skyjoy.vn/api-point/partner/v1/point-redemption

Headers

NameTypeDescription

Authorization*

string

Bearer <YOUR_ACCESS_TOKEN>

Content-Type*

string

application/json

Request Body

NameTypeDescription

transactionId*

string

partner transactionID unique key

transactionDes

string

partner transaction description

transactionDate*

string

partner transaction date

transactionAmount*

number

The amount of the partner transaction. Must be a non-negative number.

skyjoyId*

string

The user identification key obtained from the login API.

product

object

Partner-provided product information, such as product name, value, type, etc.

usedPoint*

number

The number of points selected by the user for redemption. Must be a positive number.

config

object

Customization configuration.

{
    "statusCode": 200,
    "message": "SUCCESS",
    "data": {
        "requestId": "3f186f6d-cb2b-4f86-ba1a-cec73d7d2558",
        "transactionId": "txn_a49x-123cf-13faz-wa18",
        "bitReference": "381P3480D6FQE2N2NWDMM7EHIU",
        "usedPoint": 13,
        "oldBalance": 9648205,
        "newBalance": 9648192,
        "timestamp": "2023-09-11T04:24:07.602Z"
    }
}
curl -X POST \
 --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
 --header 'Content-Type: application/json' \
 -d '{"transactionId":"txn_a49x-123cf-13faz-wa18","transactionDes":"The description of the partner transaction.","transactionDate":1678896000000,"transactionAmount":152123,"skyjoyId":"SJ5408563422","product":{"id":"prod123","name":"Product A"},"usedPoint":13,"config":{"code":"CONFIG_1"}}' \
 'https://api.skyjoy.vn/api-point/partner/v1/point-redemption'

Point Accrual

POST https://api.skyjoy.vn/api-point/partner/v1/point-accrual

Headers

NameTypeDescription

Authorization*

string

Bearer <YOUR_ACCESS_TOKEN>

Content-Type*

string

application/json

Request Body

NameTypeDescription

skyjoyId*

string

The SkyID of the member to accrue points to

transactionId*

string

The unique key for the partner transaction.

itemId

string

The unique key for the partner transaction.

transactionDes

object

The product information for the transaction.

transactionDate*

string

The date of the partner transaction.

transactionAmount*

number

The amount of the partner transaction. Must be a non-negative number.

customerInfo

The customer information for the transaction.

config

The configuration for the accrual request.

{
    "statusCode": 200,
    "message": "SUCCESS",
    "data": {
        "sponsorId": 220,
        "transactionId": "F42F3F3378D83A8B2A242E818CB49",
        "bitReference": "2WJOAMGHHA4FE21UER4RTX5FGL",
        "skyjoyId": "SJ5408563422",
        "balance": {
            "oldBalance": 9648192,
            "newBalance": 9648194
        },
        "timestamp": "2023-09-11T04:43:32.900Z",
        "requestId": "da628090-4f2b-4b7a-a4c5-20f52a8630d9"
    }
}
curl -X POST \
 --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
 --header 'Content-Type: application/json' \
 -d '{"skyjoyId":"SJ5408563422","transactionId":"F42F3F3378D83A8B2A242E818CB49","itemId":"it_F42F3F3378D83A8B2A242E818CB48","transactionDes":{"voucher":"Tiki Book","value":150000},"transactionDate":1678896000000,"transactionAmount":152123,"customerInfo":{"firstName":"NGUYEN VAN","lastName":"A"},"config":{"campaignPoint":500}}' \
 'https://api.skyjoy.vn/api-point/partner/v1/point-accrual'

Last updated