References
TerraCore v0
#
CreateMemberRequestName | Mandatory | Description | Type | Range | Constraint |
---|---|---|---|---|---|
name | yes | Member name | string | [1-100] | Not contain special chars (@, # ...) |
email | no | Member email | string | [1-50] | Follow email format |
gender | no | Gender | string | {F, M, N} | |
dateOfBirth | no | Member dob | string | [8-8] | yyyy-MM-dd |
idCardNumber | no | Id of identity card | string | [9-12] | |
passportNumber | no | Id of passport | string | [8-12] | |
idCitizenNumber | no | Id of citizen card | string | [12-12] | |
address | no | Member address | string | [0-200] |
#
MemberInfoName | Mandatory | Description | Type |
---|---|---|---|
id | yes | Member loyalty identifier | string |
phone | yes | Member phone | string |
name | yes | Member name | string |
status | yes | Member status (0: inactive, 1: active) | integer |
point | no | Loyalty point balance | long |
tierPoint | no | The point of member in tier | long |
keepTierTo | no | The time that tier will expire | long (timestamp) |
accumulationFrom | no | The start date of the points accumulation cycle | long (timestamp) |
accumulationTo | no | The end date of the points accumulation cycle | long (timestamp) |
currentTier | no | The current tier information | TierInfo |
nextTier | no | The xext tier information(if any) | TierInfo |
#
TierInfoName | Mandatory | Description | Type |
---|---|---|---|
code | yes | The code of tier | string |
name | yes | The name of tier | string |
minPoint | yes | Minimum point to achieve this tierr | integer |
#
TransactionHistoryQueryQuery for filtering transactions
Name | Mandatory | Description | Type | Constraint |
---|---|---|---|---|
merchantCode | no | Filter by merchant code | string | |
fromTime | no | Filter from time | string | YYYY-mm-dd hh:mm:ss |
toTime | no | Filter to time | integer | YYYY-mm-dd hh:mm:ss |
txnTypes | no | Filter by transaction types | TransactionType[] | |
status | no | Filter by status | TransactionStatus | |
page | no | Page | int | |
pageSize | no | Page size | int |
#
TransactionTypeName | Value | Description |
---|---|---|
GRANT | 01 | Grant points |
SPEND | 02 | Spend points |
RETURN_GRANT | 03 | Revert granted points |
RETURN_SPEND | 04 | Revert spended points |
INITIATE | 05 | Initial |
INITIATE_PROMOTION | 06 | Initial by promotion |
ISSUE | 07 | Issue |
#
TransactionStatusName | Value | Description |
---|---|---|
INIT | 1 | Init |
INIT_FAILURE | 2 | Init failed |
NO_ACCOUNTING | 3 | No accounting |
ACCOUNTING_SUCCESS | 4 | Accounting success |
ACCOUNTING_FAILURE | 5 | Accounting failed |
ACCOUNTING | 6 | Accounting |
#
TransactionHistoryResultName | Mandatory | Description | Type |
---|---|---|---|
transactions | yes | List of transactions | Transaction[] |
pageData | yes | Filter from time | PageData |
#
TransactionName | Mandatory | Description | Type | Constraint |
---|---|---|---|---|
id | yes | Transaction id | string | |
refId | yes | Transaction refId | string | |
orderCode | no | Order code | string | |
txnType | yes | Transaction type | TransactionType | |
subType | yes | Subtype | SubType | |
accountingType | yes | Filter by status | AccountingType | |
status | yes | Filter by status | TransactionStatus | |
point | yes | Point amount | int | |
createdAt | yes | Created timestamp | long | |
refTime | no | Ref time | long | |
createdBy | yes | Point amount | string | |
networkId | yes | Network id | long | |
networkName | yes | Network name | string | |
merchantCode | no | Merchant code | string | |
merchantName | no | Merchant name | string | |
terminalCode | no | Terminal code | String | |
terminalName | no | Terminal name | String | |
terminalAddress | no | Terminal address | String |
#
SubTypeName | Value | Description |
---|---|---|
ORDER | 1 | Order |
DIRECT | 2 | Direct |
PRIVILEGE | 3 | Privilege |
ENROLLMENT | 4 | Enrollment |
RETRY | 5 | Retry |
NETWORK_IMPORT | 6 | Network import |
MERCHANT_IMPORT | 7 | Merchant import |
ADMIN_MANUAL | 8 | Admin manual |
#
AccountingTypeName | Value | Description |
---|---|---|
DEBIT | DEBIT | + points |
CREDIT | CREDIT | - points |
#
PageDataName | Mandatory | Description | Type |
---|---|---|---|
currentPage | yes | Page number | int |
pageSize | yes | Page size | int |
totalItems | yes | Total items | int |
totalPage | yes | Total pages | int |
#
Error codeName | Description | What to do |
---|---|---|
InvalidParamFormat | "param name" invalid format | check constraint |
ParamOutOfRange | "param name" out of range | check constraint |
MissingParam | Required "param name" | check constraint |
InvalidParam | "param name" invalid | check if param in allowed list, or recheck auth token |
Unauthorized | No permission to access | recheck auth token |
SubjectNotFound | "param/subject" not found | mean user is not a loyalty member yet |
SubjectInactive | "param/subject" inactive | mean user's loyalty account is deactivated yet |
Conflict | "param/subject" is duplicated | check if user phone already exists on same network |
other | Other exception | check details in exception message |