SIXR API

post
/auth

https://partnerapi.six.th/v1/auth
This endpoint allows you to let user do authentications
Request
Response
Request
Headers
x-api-id
required
string
An API id
x-api-key
required
string
An API key
Body Parameters
authrequest
required
object
{ "phone_number": "+66875556666" } phone_number : Country code is needed to put at the beginning without ‘0’ leading.
Response
200: OK
Successful request, user will receive SMS with OTP
{
"success": true,
"data": {
"ref_no": "GDDNE",
"transaction_id": "07816604-9caf-45b6-ace2-e4e3565193dc"
}
}
500: Internal Server Error
Fatal error, unexpected error.
{
"success": false,
"message": "System error"
}

put
/auth

https://partnerapi.six.th/v1/auth
This endpoint allows you to let user do authentications
Request
Response
Request
Headers
x-api-id
required
string
An API id
x-api-key
required
string
An API Key
Body Parameters
authrequest
required
object
{ "ref_no": "GDDNE", "transaction_id": "07816604-9caf-45b6-ace2-e4e3565193dc", "confirm_code": "554133" } ref_no : Random 5 alphabet character referenced to OTP code which will also be part of the SMS message. transaction_id : Reference transaction id refer to generated OTP code. This code will not seen by the user. confirm_code : 6--digits of number received via user’s SMS message.
Response
200: OK
Successful request, user will receive SMS with OTP
{
"success": true,
"data": {
"ref_no": "GDDNE",
"transaction_id": "07816604-9caf-45b6-ace2-e4e3565193dc",
"user_id": "80a0e232-58b8-45f9-b1a7-c91bd97c7b2d",
"username": "sixruser",
"wallet_user": true
}
}
400: Bad Request
Bad request with error code
{
"success": true,
"error_code": 50,
"error_message": "No operation."
}
/*
About error_code
50 : No operation for the request
206 : Confirm code not matched
*/

post
/users

https://partnerapi.six.th/v1/users
Request
Response
Request
Headers
x-api-id
required
string
An API id
x-api-key
required
string
An API KEY
Body Parameters
createUserRequest
required
object
{ "ref_no": "GDDNE", "transaction_id": "07816604-9caf-45b6-ace2-e4e3565193dc", "username": "foo" } ref_no : Ref No. of the OTP which has been already verified. transaction_id : The transaction ID of the OTP which has been already verified. username : Decided username.
Response
200: OK
Successful request, user will receive SMS with OTP
{
"user_id": "07816604-9caf-45b6-ace2-e4e3565193dc"
}
400: Bad Request
Bad request with error code
{
"success": true,
"error_code": 50,
"error_message": "No operation."
}
/*
About error_code
50 : No operation for the request
120 : Verified OTP has expired
220 : Decided username already exists
*/
500: Internal Server Error
Fatal error, unexpected error.
{
"success": false,
"message": "System error"
}

post
/transactions/reward-six

https://partnerapi.six.th/v1/transactions/reward-six
Request
Response
Request
Headers
x-api-id
required
string
An API id
x-api-key
required
string
An API Key
Body Parameters
rewardTxRequest
required
object
{ "user_id": "07816604-9caf-45b6-ace2-e4e3565193dc", "sixr_amount": 10 } user_id : Generated user identifier sixr_amount : Amount of SIXr to reward to user
Response
200: OK
{
"success": true,
"data": {
"tx_id": "a90b3dc20f28a861e687488eec68ca5a3af4165ca6930fb79e38011792b5da14"
}
}
400: Bad Request
Bad request with error code
{
"success": true,
"error_code": 50,
"error_message": "No operation."
}
/*
About error_code
50 : No operation for the request
210 : User not found
*/
500: Internal Server Error
Fatal error, unexpected error.
{
"success": false,
"message": "System error"
}

post
/sixr/redeems/claims

https://partnerapi.six.th/sixr/redeems/claims
For claim SIXR
Request
Response
Request
Body Parameters
x-six-authorization
required
string
SIX Authorization
claimRequest
required
object
{ "reward_id": "828", "qty": 5 } reward_id : Known as product ID to be claimed qty : Claimed quantity
Response
200: OK
Successful request, client will receive status and transaction id
{
"status": 0,
"message": "string",
"body": {
"id": "string",
"event_type": "string",
"model_type": "string",
"timestamp": 0,
"asset_type": "string",
"asset_issuer": "string",
"amount": 0,
"amount_usd": 0,
"amount_thb": 0,
"memo": "string",
"ref_code": "string",
"tx_id": "string",
"direction_type": "string",
"from": {
"wallet": {
"model_type": "string",
"id": "string",
"type": "string",
"asset_type": "string",
"memo": "string",
"address": "string",
"balance": 0
},
"previous_balance": 0,
"current_balance": 0
},
"to": {
"wallet": {
"model_type": "string",
"id": "string",
"type": "string",
"asset_type": "string",
"memo": "string",
"address": "string",
"balance": 0
},
"previous_balance": 0,
"current_balance": 0
}
}
}
500: Internal Server Error
Fatal error, unexpected error.
{
"success": false,
"message": "System error"
}

post
/sixr/tx

https://partnerapi.six.th/sixr/tx
Request
Response
Request
Body Parameters
x-six-authorization
required
string
SIX Authorization
txRequest
required
object
{ "type": "Payment", "asset_name": "SIXR", "to_username": "v" } type : Tx type, for now it’s only Payment asset_name : Asset name, now there’s only SIXR to_username : Username of the destination user
Response
200: OK
Successful request, client will receive status and transaction id
{
"status": "Success",
"tx_id": "e-fbeab1f3-5671-49ef-854c-1b8d993cb92c"
}
/*
tx_id : The returned transaction id.
*/
500: Internal Server Error
Fatal error, unexpected error.
{
"success": false,
"message": "System error"
}