WorldFirst DocsWorldFirst Docs

Update merchant transaction rulesSignature required

POST /amsin/api/v1/business/worldcard/updateMerchantTransactionRules

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

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

Show child parameters

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.

API Explorer

Request

URL
Case
Set the global whitelist
Request Body

Response

Case
Set the global whitelist
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.