SkyJoy
HomeDocs
  • 👋Welcome to SkyJoy
  • GETTING STARTED
    • Introduction
    • Ground rules for API
    • Authentication
    • Error handling
  • DEVELOPMENT PROCESS
    • Integration model
    • Batch
  • API REFERENCE
    • Authentication
    • Customer
    • Point
    • Transaction
  • WEBHOOK
    • Partner Integration
  • SINGLE SIGN-ON (SSO)
    • iFrame
    • Regular Web App
    • Single Page App
  • VERSION HISTORY
    • Document changelog
Powered by GitBook
On this page
  • Summary
  • Methods
  • Point Redemption With Token
  • Point Accrual

Was this helpful?

  1. API REFERENCE

Point

Point APIs reference

Summary

Create transactions involving SkyPoints, including point accrual and redemption

Methods


Point Redemption With Token

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

Headers

Name
Type
Description

Authorization*

string

Bearer <YOUR_ACCESS_TOKEN>

Content-Type*

string

application/json

Request Body

Name
Type
Description

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

usedPoint*

number

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

sign*

string

Signed data token

{
    "statusCode": 200,
    "message": "SUCCESS",
    "data": {
        "requestId": "16c606fd-87c9-4d08-8d6f-0c9c25554c59",
        "transactionId": "85e187d1-0661-4058-ba56-49e86dcc5ad5",
        "bitReference": "1X9MLOQ749DYX2DK2L14TUTZUF",
        "usedPoint": 33,
        "timestamp": "2024-10-09T07:25:50.397Z"
      }
}
curl -X POST \
 --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
 --header 'Content-Type: application/json' \
 -d '{ "transactionId": "85e187d1-0661-4058-ba56-49e86dcc5ad5", "transactionDate": "2024-10-09T07:25:37.784Z", "transactionDes": "Save 10% off your purchase by using this voucher code!", "transactionAmount": 55000, "usedPoint": 33, "skyjoyId": "SJ5658649698", "sign": "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczovL2lkLnN0Zy5za3lqb3kuaW8vcmVhbG1zL3N0Zy1sb3lhbHR5IiwiaWF0IjoxNzI4NDU4NzQ4LCJleHAiOjE3Mjg0NjA1NDgsInN1YiI6ImEwZmM5NmVkLWIwOTAtNDdlMy04MjFhLTdhODQyMGIwZGQxZSIsInR4bl9kYXRhIjoie1widHJhbnNhY3Rpb25BbW91bnRcIjo1NTAwMCxcInRyYW5zYWN0aW9uRGF0ZVwiOlwiMjAyNC0xMC0wOVQwNzoyNTozNy43ODRaXCIsXCJ0cmFuc2FjdGlvbklkXCI6XCI4NWUxODdkMS0wNjYxLTQwNTgtYmE1Ni00OWU4NmRjYzVhZDVcIixcInVzZWRQb2ludFwiOjMzLFwic2t5am95SWRcIjpcIlNKNTY1ODY0OTY5OFwifSIsInNpZ25lZF90aW1lIjoxNzI4NDU4NzQ4OTQ5LCJ1c2VyX2lkIjoiYTBmYzk2ZWQtYjA5MC00N2UzLTgyMWEtN2E4NDIwYjBkZDFlIn0.ho2Ld3q9h14KpKzLqZaUBNskyGfWCXAjWP9d7XVLPm9SoZd8z8gYEF3JqIGfk_KX60Wgt_IP1Vto_e7uJJW52fwySpQpS4WQyNk4O7hNjKek-uVZ2f-c6bOqg1GhtfWXaaM9eUpwrOmwMjqPv9BHidFtQgZ_isdzQOLFYwgy2BSInlGUbgB5AlVwdwtDEX7GzqaR2WZhhCsIII29fBinmWfghyo6okqeqvuc7vmKXzsTm_wfM_ws7SQWVG8qXaKU82MvnR0CTMJQeQZxTABZepzZGWa9PDM7DBsyTzkrP-EXoKliDn9r2zizypqIG8rb2nyO9ZCnMAxnmxtl_n7p7w" }' \
 'https://api.skyjoy.vn/api-point/partner/v1/point-redemption-with-token'

Point Accrual

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

Headers

Name
Type
Description

Authorization*

string

Bearer <YOUR_ACCESS_TOKEN>

Content-Type*

string

application/json

Request Body

Name
Type
Description

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

transactionCurrency*

string

The currency of the partner transaction. Default is VND

extraData

object

The customized data

{
    "statusCode": 200,
    "message": "SUCCESS",
    "data": {
        "sponsorId": 220,
        "transactionId": "F42F3F3378D83A8B2A242E818CB49",
        "bitReference": "2WJOAMGHHA4FE21UER4RTX5FGL",
        "skyjoyId": "SJ5408563422",
        "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,"transactionCurrency": "VND","extraData":{"firstName":"NGUYEN VAN","lastName":"A"}}' \
 'https://api.skyjoy.vn/api-point/partner/v1/point-accrual'

Last updated 5 months ago

Was this helpful?