Updating an Instance
Description
KooGallery calls this API to update the expiration date of an instance after a customer purchases a product after trial use, renews the product, or cancels the renewal.
- When this API is called, update the expiration date and return a notification to KooGallery.
- Ensure that this API is normal. If the API fails to be called, customer services may be released.
- 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 freezing a SaaS product frequently fails due to exceptions, KooGallery will remove the product from the catalog.
The following figure shows the process of updating an instance.
Request Message
The following table describes the request parameters.
Request method: POST
Parameter |
Mandatory |
Type |
Maximum Length |
Description |
---|---|---|---|---|
activity |
Yes |
String |
20 |
Request ID, which is used to distinguish the scenario. For renewals, the value is refreshInstance. |
scene |
Yes |
String |
64 |
Scenario where the instance change is triggered.
|
orderId |
Yes |
String |
64 |
KooGallery order ID. The commercial order ID is transferred when the customer purchases the product after trial use. The renewal order ID is transferred during renewal. The ID of the renewal order to be cancelled is transferred during unsubscription. |
orderLineId |
Yes |
String |
64 |
KooGallery order line ID. |
instanceId |
Yes |
String |
64 |
Instance ID. |
productId |
No |
String |
64 |
Product ID. If a customer renews a product and changes the billing cycle or a customer purchases a product after trial use, a new productId is provided. |
expireTime |
Yes |
String |
20 |
Expiration time. Format: yyyyMMddHHmmss |
testFlag |
No |
String |
2 |
Whether a request is submitted for debugging.
The default value is 0. |
Example request:
curl -X POST 'https://www.isvwebsite.com/saasproduce?signature=3F6E6652B7BE26B27ABFC3D112***********20174FE8DE062×tamp=1680509496350&nonce=8BF8496A350E37BDB0E8956D39D433ED417C3FC9459DCFFE7F03BFBF69B12085' -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -d'{"activity":"refreshInstance","expireTime":"20221124023618256","instanceId":"10e758d0-31ad********03469a10e","orderId":"CS2211*******VS","orderLineId":"CS221******000001","productId":"OFFI461******240","scene":"RENEWAL","testFlag":"0"}'
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." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.