3. Update Card Template Status

1 API Path

/api/open/alipay/v1/ipass/template/manage/switchStatus

Production domain: https://open.alipay.hk

Endpoint:https://open.alipay.hk/api/open/alipay/v1/ipass/template/manage/switchStatus

2 API Request

2.1 Request

2.1.1 Header

Name

Description

Type

Length

Required

Remarks

Sample

clientId

Client ID

String

M

211020000000000000044

signature

Message signature information

String

M

algorithm=sha256withrsa,keyVersion=2,signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz==

encrypt

Message encryption information

String

O

algorithm=rsa, keyVersion=2

Content-type

Http content type

String

M

application/json; charset=UTF-8

2.1.2 Body

Field

Type

Length

Mandatory

Remarks

Sample

templateCode

String

32

Y

Template ID

82022031000135000000000000624234

status

String

32

Y

Template Status:

valid - go live

closed - offline

paused - temporary offline

Only the following updates are allowed:

1) frozen -> valid

2) valid -> closed

3) valid -> paused

4) paused -> valid

5) paused -> closed

valid

merchantId

String

64

Y

Merchant ID

2160120041113167

2.2 response

Field

Type

Length

Remarks

Sample

resultInfo

Object

/

Result Code

status

String

16

Template Status

2.2.1 ResultInfo

Field

Type

Length

Remarks

Sample

resultCode

String

Result Code

SUCCESS

resultStatus

String

Result Status

F - Failed

S - Success

S

resultMsg

String

Result Description

SUCCESS

2.2.2 resultCode

ResultCode

resultStatus

resultMessage

SUCCESS

S

success

PARAM_ILLEGAL

F

request parameter illegal

PASS_TEMPLATE_HAS_NOT_EXIT

F

pass template not exist

PASS_TEMPLATE_STATUS_ILLEGAL

F

pass template status enum illegal

STATE_MACHINE_ILLEGAL

F

pass template state machine check illegal

PASS_TEMPLATE_IMAGE_INVALID

F

The picture of the gift card template contains sensitive content

PASS_TEMPLATE_CUSTOMTAB_URL_INVALID

F

The custom url of the gift card template contains sensitive content

PASS_TEMPLATE_BTN_URL_INVALID

F

The button url of the gift card template contains sensitive content

PASS_TEMPLATE_CONTENT_INVALID

F

The gift card template text contains sensitive content

3. Request Example

3.1 Request

copy
{
    "merchantId": "2160120041113167",
    "templateCode": "82022031100135000000000000626075",
    "status": "valid"
}

3.2. Response

copy
{
  "templateCode": "82022031100135000000000000626075",
  "resultInfo":{
        "resultCode": "SUCCESS",
        "resultMessage":"success",
        "resultStatus": "S"
    },
   "status": "valid"
}