For the complete documentation index, see llms.txt. This page is also available as Markdown.

Points (REST)

Endpoint

Real Server : https://api.finenex.net/v1

Test Server : https://test1-api.finenex.net/v1

Authentication

To make a request, you need to include the JWT in the HTTP header. JWT can be received through the authentication server.

Example

If JWT is "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NDgyMDc1OTIsImlhdCI6MTY0ODEyMTE5Mn0.AYNcBLhKqtqwzxNm7kOREEUH0_3gFevOXxI94TBORao",

curl -X 'POST' \
  '{endpoint}/nlp/issue' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NDgyMDc1OTIsImlhdCI6MTY0ODEyMTE5Mn0.AYNcBLhKqtqwzxNm7kOREEUH0_3gFevOXxI94TBORao' \
  -H 'Content-Type: application/json' \
  -d '{
  "tokenAmount": "10"
}'

API References

Issue

NLP or NURI points are issued

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
namestringRequired

Token name (nlp or nuri)

Body
tokenAmountstringOptional

Token amount

tidstringOptional

Store TID

Responses
200

Points issued successfully

application/json
rewardIdstringOptional

Reward ID

tokenSymbolstringOptional

Token symbol (NLP or NURI)

tokenAmountstringOptional

Token amount

contractAddressstringOptional

Contract address for token

rewardDatestringOptional

Issued Date, for example, 20220325151440+0900

post/points/{name}/issue
POST /v1/points/{name}/issue HTTP/1.1
Host: test1-api.finenex.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "tokenAmount": "text",
  "tid": "text"
}
200

Points issued successfully

{
  "rewardId": "text",
  "tokenSymbol": "text",
  "tokenAmount": "text",
  "contractAddress": "text",
  "rewardDate": "text"
}

If tranNo, amount, and the token name of recently issued points are the same, it is treated as a duplicate issuance and is failed.

Example

Accumulate

The issued points are accumulated to the user wallet address

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
namestringRequired

Token name (nlp or nuri)

rewardIdstringRequired

Reward ID

Body
tokenAmountstringOptional

Token amount

userAddressstringOptional

User wallet address to accumulate

Responses
200

Points are accumulated successfully

application/json
userAddressstringOptional

User wallet address to accumulate

tokenSymbolstringOptional

Token symbol (NLP or NURI)

tokenAmountstringOptional

Token amount

contractAddressstringOptional

Contract address for token

post/points/{name}/{rewardId}/accumulate
POST /v1/points/{name}/{rewardId}/accumulate HTTP/1.1
Host: test1-api.finenex.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "tokenAmount": "text",
  "userAddress": "text"
}
200

Points are accumulated successfully

{
  "userAddress": "text",
  "tokenSymbol": "text",
  "tokenAmount": "text",
  "contractAddress": "text"
}

Example

Status

Check if it has been accumulated

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
namestringRequired

Token name (nlp or nuri)

rewardIdstringRequired

Reward ID

Responses
200

Return successfully

application/json
userAddressstringOptional

User wallet address if accumulated, otherwise null

accumulatedbooleanOptional

Is points accumulated

tokenSymbolstringOptional

Token symbol (NLP or NURI)

contractAddressstringOptional

Contract address for token

get/points/{name}/{rewardId}/status
GET /v1/points/{name}/{rewardId}/status HTTP/1.1
Host: test1-api.finenex.net
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Return successfully

{
  "userAddress": "text",
  "accumulated": true,
  "tokenSymbol": "text",
  "contractAddress": "text"
}

Example

Cancel

Cancel the issued points

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
namestringRequired

Token name (nlp or nuri)

rewardIdstringRequired

Reward ID

Body
tokenAmountstringOptional

Token amount

Responses
200

Canceled successfully

application/json
userAddressstringOptional

User wallet address or null

tokenSymbolstringOptional

Token symbol

tokenAmountstringOptional

Token amount

contractAddressstringOptional

Contract address for token

post/points/{name}/{rewardId}/cancel
POST /v1/points/{name}/{rewardId}/cancel HTTP/1.1
Host: test1-api.finenex.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "tokenAmount": "text"
}
200

Canceled successfully

{
  "userAddress": "text",
  "tokenSymbol": "text",
  "tokenAmount": "text",
  "contractAddress": "text"
}

Example

The token amount should be the same as when the points are issued.

Error Codes (resCode)

  • 200: Success

  • 400: Bad parameters

  • 401: Unauthenticated

  • 404: Not found

  • 500: Internal server error. Please see resMessage

Last updated