Update merchant transaction rulesSignature required
Call this API to set, update, switch, or clear the merchant name whitelist or blacklist rules of the current customer or of 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 operation dimension. This field is case-sensitive. Valid values are:
MID: indicates the global rules of the customer.CARD: indicates the rules of the specified card.
assetId String
The unique identifier of a card.
This field is required when the value of targetType is
CARD.
type String REQUIRED
The list type. This field is case-sensitive. Valid values are:
WHITE: indicates the whitelist.BLACK: indicates the blacklist.
Note: The whitelist and the blacklist of the same target are mutually exclusive, and switching the type clears the list of the original type. When you clear the list, this field is still required.
merchantNameList Array<String>
The list of merchant names.
Note:
- If a non-empty array is specified, the list of the specified type is completely overwritten;
- If an empty array
[ ] is specified, the whitelist and blacklist of the customer or of the specified card are both cleared.
More information:
- Value range: 0 - 200 entries
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
targetType String
The operation dimension. This field is case-sensitive. Valid values are:
MID: indicates the global rules of the customer.CARD: indicates the rules of the specified card.
This field is returned only when result.resultStatus = S.
assetId String
The unique identifier of a card.
This field is returned only when result.resultStatus = S.
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. |