alipay.intl.ipromomerchant.cashlessvoucher.template.switchStatus

Overview

URL: /api/open/v1/promotion/cashlessVoucher/template/switchStatus

Use this interface to query the switch status of a cashless voucher template.

Function logic

The status adjustment of the voucher template must conform to the following state machine.

image

Status changes:

DRAFT -> CLOSED

AUDIT -> CLOSED

ACTIVITING -> CLOSED

ACTIVTED -> PAUSED

PAUSED -> ACTIVTED

ACTIVTED -> CLOSED

PAUSED -> CLOSED

Request

Request parameters

Body

No

Name

Description

Type

Length

Required

Sample

1

templateId

Voucher template ID

string

64

M

73708217433946187370821743394618

2

status

The status of the voucher template.

Switchable status:

  • ACTIVTED
  • PAUSED
  • CLOSED

string

10

M

3

requestId

Request ID, which supports idempotency.

string

64

M

211020000000000000044

Sample

copy
POST: /api/open/v1/promotion/cashlessVoucher/template/switchStatus HTTP/1.1
Content-Type: application/json; charset=UTF-8
Request-Time: 2020-04-29T17:18:47+08:00
client-id: 5J5XSU7Y2Y182W01981
Signature: algorithm=RSA256,keyVersion=1,signature=***
{
  "templateId": "73708217433946187370821743394618",
  "status": "CLOSE",
  "requestId": "211020000000000000044"
}

Response

Response parameters

Body

No

Name

Description

Type

Length

Required

Remarks

Sample

1

result

Result information

Result

/

M

{

 "resultStatus": "S",

 "resultCode": "SUCCESS",

 "resultMessage": "success"

}

Sample

copy
client-id:TEST_5X00000000000000
content-type:application/json;charset=UTF-8
response-time:2020-03-13T09:59:22Z
signature:algorithm=RSA256,keyVersion=1,signature=rlux%2FDjx44EuIDEW3pEkttG1vw%2FAOdbyxHN7xF2SuHDJ8F%2BW4Q4fXZl7iVAn7zeR0CwWkqHZvJ6pdMVz5FNy7pFIQoACilNx1UJd3gT%2FNN0WLn%2BomEzTgBBu2oKy0nrE%2BHKZN9SbA0R9oWH2gpO1yiry%2FGZhW%2F9JYs2hHIufEx60MfAYaUOsU2m%2FpRpAgzsIV6Cxlb2bDaenMfUR8l1OtSfRp80jy%2BknR5JSQ77GKGU%2BXn6aFTJggnSTSqSO6MflWBQ8c1jF0%2BkN9u6KzSKRhNWuiBs3jQ80bt19xPyM8Du4FNKdAzGPkpIM7589Wa30XFdjnkSOmqJCmzr5UK5CXQ%3D%3D
tracerid:0be9923a15840935597895255e8e44.0.1.1
{
  "result": {
    "resultStatus": "S",
    "resultCode": "SUCCESS",
    "resultMessage": "success"
  }
}

Result codes

Business result codes

No

resultCode

resultStatus

resultMessage

1

SUCCESS

S

Success

2

UNKNOWN_EXCEPTION

U

API failed due to unknown reasons. Retry.

3

PARAM_ILLEGAL

F

Illegal parameters. For example, non-numeric input, invalid date. Non-empty check.

4

TEMPLATE_STATUS_ABNORMAL

F

The template status is abnormal.

5

TEMPLATE_STATUS_NOT_SUPPORT

F

The template status does not support.

6

TEMPLATE_NOT_EXIST

F

The template data is invalid.

7

SERVICE_NOT_AVAILABLE

F

Service degradation not available.

8

MERCHANT_CONTRACT_NOT_EXIST

F

The merchant contract does not exist.

9

NO_MERCHANT_CONTRACT_BEEN_SIGNED

F

No product contract has been signed.

10

CONTRACT_INVALID

F

Invalid product contract

Supernet result codes

No

ResultCode

ResultStatus

resultMessage

1

INVALID_SIGNATURE

F

The signature is invalid.

2

PROCESS_FAIL

F

General business failure. No retry.

3

CLIENT_FORBIDDEN_ACCESS_API

F

Client is not authorized to use this API.

4

UNKNOWN_CLIENT

F

Unknown client

5

INVALID_CLIENT_STATUS

F

Invalid client status

6

REQUEST_TRAFFIC_EXCEED_LIMIT

F

Request traffic exceed limit.

7

KEY_NOT_FOUND

F

The key is not found.

8

ACCESS_DENIED

F

Access denied

9

API_IS_INVALID

F

API is invalid or not active.

10

UNKNOWN_EXCEPTION

F

API failed due to unknown reason.

11

OAUTH_FAILED

F

oAuth authentication failed.

12

NO_INTERFACE_DEF

F

API is not defined.