Subscription Service. (1.0.0)
Download OpenAPI specification:Download
This service provides subscription resources and actions:
Get all subscriptions
Get all subscriptions
Authorizations:
query Parameters
size | integer <int64> Default: 50 Amount of items returned per pagination page |
page | integer <int64> Default: 0 Pagination page starting from 0 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "format": "short",
- "items": [
- {
- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
], - "last": false,
- "number": 41,
- "size": 10,
- "totalItems": 100523,
- "totalPages": 10053
}
Get all subscriptions models
Get all subscriptions models
Authorizations:
query Parameters
size | integer <int64> Default: 50 Amount of items returned per pagination page |
page | integer <int64> Default: 0 Pagination page starting from 0 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "format": "short",
- "items": [
- {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}
], - "last": false,
- "number": 41,
- "size": 10,
- "totalItems": 100523,
- "totalPages": 10053
}
Create a subscription
Create a subscription
Authorizations:
Request Body schema: application/jsonrequired
createDate | integer <int64> Entity creation time. Value is auto generated upon creation and read only. Timestamp in milliseconds. |
currency | string |
customerId | string Associates entity to certain customer. |
dbVersion | integer <int64> Concurrent operations check mechanism. Used in update actions. Value is auto generated upon creation/update and read only. Prevent for any issue during concurrent update transaction done by parallel applications. Upon spotted dbVersion incorrectness a 412 retry error is returned. Let's consider a scenario where two application are trying update same entity: App 1: GET entity request at 00:00:00.000 Received dbVersion=0 change entity data PUT entity request at 00:00:00.009 updated automatically dbVersion=1 App 2: GET entity request with at 00:00:00.005 Received dbVersion=0 because update of App 1 haven't occurred yet change entity data update entity at 00:00:00.014 412 Error, because dbVersion=1 after update of App 1 |
object | |
object (DiscountPlan) | |
Array of objects (Email) | |
enduserId | string Associates entity to certain end user. |
externalContext | string |
id | string Entity id. Value is auto generated upon creation and read only. |
imported | boolean |
initialOrderId | string |
layout | string |
layoutName | string |
object | |
mandateValue | number <double> |
migratedFromCustomerId | string |
object (SubscriptionModel) | |
modelId | string |
name | string |
Array of objects (Product) | |
Array of objects (Product) | |
storeId | string |
updateDate | integer <int64> Entity update time. Value is auto generated upon creation/update and read only. Timestamp in milliseconds. |
upgradable | boolean |
Responses
Request samples
- Payload
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Get a subscription model by name
Get a subscription model by name
Authorizations:
path Parameters
model required | string Model name |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Delete a subscription by id
Delete a subscription by id
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Responses
Response samples
- 400
- 401
- 403
- 500
{- "error": "Bad Request",
- "message": "error: field can't be empty",
- "path": "/service-name/resource/36a6d3ac-207f-4b64-be01-664c1edbd38b",
- "status": 400,
- "timestamp": 1593769514607
}
Get a subscription by id
Get a subscription by id
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Update a subscription by id
Update a subscription by id
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Request Body schema: application/jsonrequired
createDate | integer <int64> Entity creation time. Value is auto generated upon creation and read only. Timestamp in milliseconds. |
currency | string |
customerId | string Associates entity to certain customer. |
dbVersion | integer <int64> Concurrent operations check mechanism. Used in update actions. Value is auto generated upon creation/update and read only. Prevent for any issue during concurrent update transaction done by parallel applications. Upon spotted dbVersion incorrectness a 412 retry error is returned. Let's consider a scenario where two application are trying update same entity: App 1: GET entity request at 00:00:00.000 Received dbVersion=0 change entity data PUT entity request at 00:00:00.009 updated automatically dbVersion=1 App 2: GET entity request with at 00:00:00.005 Received dbVersion=0 because update of App 1 haven't occurred yet change entity data update entity at 00:00:00.014 412 Error, because dbVersion=1 after update of App 1 |
object | |
object (DiscountPlan) | |
Array of objects (Email) | |
enduserId | string Associates entity to certain end user. |
externalContext | string |
id | string Entity id. Value is auto generated upon creation and read only. |
imported | boolean |
initialOrderId | string |
layout | string |
layoutName | string |
object | |
mandateValue | number <double> |
migratedFromCustomerId | string |
object (SubscriptionModel) | |
modelId | string |
name | string |
Array of objects (Product) | |
Array of objects (Product) | |
storeId | string |
updateDate | integer <int64> Entity update time. Value is auto generated upon creation/update and read only. Timestamp in milliseconds. |
upgradable | boolean |
Responses
Request samples
- Payload
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Cancel subscription
Cancel subscription
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Responses
Response samples
- 200
- 400
- 401
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Pre-bill a subscription
This endpoint is used for creating pre-billed orders when pre-billings don't exist. For example, it is used for orders when discount source is OFFER
This endpoint may be used in the case of a discount OFFER process to pre-bill a subscription when pre-billing does not exist.
Authorizations:
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "id": "string",
- "lineItems": [
- {
- "id": "string",
- "productId": "string",
- "subscriptionId": "string"
}
]
}
Reactivate subscription
Reactivate subscription
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Responses
Response samples
- 200
- 400
- 401
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Suspend subscription
Suspend subscription
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Responses
Response samples
- 200
- 400
- 401
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Upgrade subscription
Upgrade subscription
Authorizations:
path Parameters
subscriptionId required | string ID of subscription |
Request Body schema: application/jsonrequired
createDate | integer <int64> Entity creation time. Value is auto generated upon creation and read only. Timestamp in milliseconds. |
currency | string |
customerId | string Associates entity to certain customer. |
dbVersion | integer <int64> Concurrent operations check mechanism. Used in update actions. Value is auto generated upon creation/update and read only. Prevent for any issue during concurrent update transaction done by parallel applications. Upon spotted dbVersion incorrectness a 412 retry error is returned. Let's consider a scenario where two application are trying update same entity: App 1: GET entity request at 00:00:00.000 Received dbVersion=0 change entity data PUT entity request at 00:00:00.009 updated automatically dbVersion=1 App 2: GET entity request with at 00:00:00.005 Received dbVersion=0 because update of App 1 haven't occurred yet change entity data update entity at 00:00:00.014 412 Error, because dbVersion=1 after update of App 1 |
object | |
object (DiscountPlan) | |
Array of objects (Email) | |
enduserId | string Associates entity to certain end user. |
externalContext | string |
id | string Entity id. Value is auto generated upon creation and read only. |
imported | boolean |
initialOrderId | string |
layout | string |
layoutName | string |
object | |
mandateValue | number <double> |
migratedFromCustomerId | string |
object (SubscriptionModel) | |
modelId | string |
name | string |
Array of objects (Product) | |
Array of objects (Product) | |
storeId | string |
updateDate | integer <int64> Entity update time. Value is auto generated upon creation/update and read only. Timestamp in milliseconds. |
upgradable | boolean |
Responses
Request samples
- Payload
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}
Response samples
- 200
- 400
- 401
{- "createDate": 1593683684789,
- "currency": "string",
- "customerId": "e0436791-5866-406d-b0c8-3ba32ead438a",
- "dbVersion": 0,
- "decodedExternalContext": {
- "property1": null,
- "property2": null
}, - "discountPlan": {
- "startingStep": 0,
- "tag": "string"
}, - "emails": [
- {
- "date": 0,
- "emailId": "string",
- "id": "string",
- "message": "string",
- "templateName": "string"
}
], - "enduserId": "c84b801f-6f8d-4b32-8b8e-406e91a473d6",
- "externalContext": "string",
- "id": "d87e0973-980a-4485-a39d-682184a8988a",
- "imported": true,
- "initialOrderId": "string",
- "layout": "string",
- "layoutName": "string",
- "lifecycle": {
- "anniversaryDate": 0,
- "creationDate": 0,
- "daysBeforeAnniversary": 0,
- "estimatedExpirationDate": 0,
- "expirationDate": 0,
- "generation": 0,
- "id": 0,
- "modelId": "string",
- "nextBillingDate": 0,
- "paymentDeadline": 0,
- "prebillingDate": 0,
- "sgSubId": "string",
- "status": "string"
}, - "mandateValue": 0.1,
- "migratedFromCustomerId": "string",
- "model": {
- "customerId": "string",
- "durationUntilTrialEnd": 0,
- "id": "string",
- "name": "string",
- "term": {
- "unit": "string",
- "value": "string"
}
}, - "modelId": "string",
- "name": "string",
- "nextProducts": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "products": [
- {
- "dynamicVariables": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "licenseId": "string",
- "lineItemId": "string",
- "previousLineItemId": "string",
- "priceFunctionParameters": {
- "property1": null,
- "property2": null
}
}
], - "storeId": "string",
- "updateDate": 1593685645385,
- "upgradable": true
}