Query merchant transaction rulesSignature required
Call this API to query the merchant name whitelist or blacklist rules that are configured for the customer or for a specified card.
Structure
A message consists of a header and body. For details, see the following sections.
Request header
Field | Required | Sample | Description |
Client-Id | Yes |
|
|
Signature | Yes |
| |
Content-Type | Yes |
| |
Request-Time | Yes |
| |
Connected-AccountId | Conditional |
| Attention Required when a partner manages a customer's account. |
Access-Token | Conditional |
| Attention Required for OAUTH authorization. Refer to applyToken. |
Request parameters
targetType String REQUIRED
The query dimension. This field is case-sensitive. Valid values are:
MID: indicates the global rules of the customer.CARD: indicates the card-level rules.
assetId String
The unique identifier of a card.
Note:
- When the value of targetType is
MID, this field is not required.- When the value of targetType is
CARD:
- If you specify the value of assetId , the specified card is queried.
- If you do not specify the value of assetId, card rules are queried by page.
pageNumber Integer
Indicates the current page index. The first page index is 1.
Format: 1, 2, 3, ...
When the value of targetType is
CARDand the value of assetId is not specified, this field can be passed as needed.
pageSize Integer
The number of items on each page. Recommended value is 10.
When the value of targetType is
CARDand the value of assetId is not specified, this field can be passed as needed.
More information:
- Value range: 1 - 100 (both inclusive)
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
hasMore Boolean
Whether more pages are available. Valid values are:
true: indicates that more pages are available.false: indicates that the current page is the last page.
This field is returned only when result.resultStatus = S.
This field returns
falsein the following cases:
- When the value of targetType is
MID; or- When the value of targetType is
CARDand the value of assetId is specified.
transactionRuleList Array<MerchantTransactionRule>
The array of merchant name rules.
This field is returned only when result.resultStatus = S.
Note:
- When the value of targetType is
MID, or the value of targetType isCARDand the value of assetId is specified, this field returns 0 or 1 entries;- When the value of targetType is
CARDbut the value of assetId is not specified, the rules on the current page are returned.
Request
Response
Result processing logic
After calling the API, a response is returned. The possible responses for result.resultStatus are:
result.resultCode
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | Success | N/A |
| UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | A server error occurs. Retry later; if the issue persists, contact our Technical Support Team. |
| PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Refer to the API documentation page and check whether the request header and parameters are correct. |
| SYSTEM_ERROR | F | System error. | Do not retry. Contact our Technical Support Team for details. |
| USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |