WorldFirst DocsWorldFirst Docs

Query merchant transaction rulesSignature required

POST /amsin/api/v1/business/worldcard/queryMerchantTransactionRules

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

Client-Id: *****

Signature

Yes

Signature: algorithm=RSA256, keyVersion=2, signature=*****

Content-Type

Yes

Content-Type: application/json; charset=UTF-8

Request-Time

Yes

Request-Time: 2019-04-04T12:08:56+08:00

Connected-AccountId

Conditional

Connected-AccountId: *****

Attention

Required when a partner manages a customer's account.

Access-Token

Conditional

Access-Token: ******

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 CARD and 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 CARD and 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.

Show child parameters

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 false in the following cases:

  • When the value of targetType is MID; or
  • When the value of targetType is CARD and 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 is CARD and the value of assetId is specified, this field returns 0 or 1 entries;
  • When the value of targetType is CARD but the value of assetId is not specified, the rules on the current page are returned.
Show child parameters
API Explorer

Request

URL
Case
Query whitelist by MID
Request Body

Response

Case
Query whitelist by MID
Response Body

Result processing logic

After calling the API, a response is returned. The possible responses for result.resultStatus are:

Result status

Description

S

Indicates that the API call succeeded.

F

Indicates that the API call failed. For additional information on the failure, refer to result.resultCode.

U

Indicates that the API call result is unknown. If this status is returned, the Partner may make a query. The querying strategy is as follows:

  • Maximum 7 queries are allowed. 
  • Intervals between queries: 5 min, 10 min, 20 min, 40 min, 80 min, 160 min, and 320 min.

If no queries succeed, contact our Technical Support Team.

result.resultCode

CodeValueMessageFurther action
SUCCESSSSuccess

N/A

UNKNOWN_EXCEPTIONUAPI failed due to unknown reason.

A server error occurs. Retry later; if the issue persists, contact our Technical Support Team.

PARAM_ILLEGALFIllegal 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_ERRORFSystem error.

Do not retry. Contact our Technical Support Team for details.

USER_NOT_EXISTFThe user does not exist.

Retry with the correct user information.