Updated on 2023-09-01 GMT+08:00

Updating the Instance Status

Description

After a customer purchases a yearly/monthly/daily product and the instance expires or the customer violates regulations, KooGallery calls this API to freeze the instance.

  • If you receive an email indicating that the API fails to be called in your email address of customer service or that one bound to your KooGallery account, handle the API exception in a timely manner.
  • KooGallery monitors API exceptions. If a product has frequent instance exceptions, KooGallery will remove the product from the catalog.

The following figure shows the process of updating the instance status.

Request Message

Request method: POST

The following table describes the request parameters.

Parameter

Mandatory

Type

Maximum Length

Description

activity

Yes

String

32

Request ID, which is used to distinguish the scenario.

For instance status updates, the value is updateInstanceStatus.

instanceId

Yes

String

64

Instance ID.

status

Yes

String

32

New status.

  • FREEZE: frozen.
  • UNFREEZE: unfrozen.

testFlag

No

String

2

Whether a request is submitted for debugging.

  • 1: debugging request.
  • 0: non-debugging request.

The default value is 0.

Example request:

curl -X POST 'https://www.isvwebsite.com/saasproduce?signature=95DD9FA6A8C***********5290919BCA3F78B9A254428A692CDF26E&timestamp=1680509558159&nonce=9F26B85CAEB3A8439221BA293E9250BC5EA689225B523C291EA75CC76B469510' -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -d'{"activity":"updateInstanceStatus","instanceId":"10e75*********1b-81d03469a10e","status":"FREEZE","testFlag":"1"}'

Response Message

The following table describes the response parameters.

Parameter

Mandatory

Type

Maximum Length

Description

resultCode

Yes

String

6

Invocation result code.

For details, see Result Codes.

resultMsg

No

String

255

Invocation result description.

Example response:

{
    "resultCode":"000000", 
    "resultMsg":"success." 
}