Preview a subscription item change
POST
/v1/subscriptions/{subscriptionId}/change/previewAuthorization
AuthorizationBearer token · headerrequiredPublic API key bearer token.
Path parameters
subscriptionIdstringrequiredQuery parameters
environmentstringrequiredmerchantAccountIdstringrequiredRequest body
requiredapplication/jsoneffectiveAtstring<date-time>itemsSubscriptionItemChangeRequestItem[]requiredmin items 1
Show propertiesHide properties
Array of
SubscriptionItemChangeRequestItempriceIdstringrequiredquantityintegermin 1
metadataMetadatarequestedByRefstringResponses
200Success
dataobjectrequiredrequestIdstringrequired400Bad request, including malformed JSON
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject401Missing or invalid API key
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject409Conflict, including idempotency body drift
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject422Validation failed
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobject429API key rate limit exceeded
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobjectdefaultError
errorobjectrequiredShow propertiesHide properties
codestringrequiredAllowed:
bad_requestunauthorizedforbiddennot_foundconflictrate_limitedvalidation_failurenot_implementedinternal_errormessagestringrequiredrequestIdstringdocsUrlstringDeep link to the errors guide section for this code.
detailsobjectRequest
curl -X POST "https://api.vortex.nyc/v1/subscriptions/string/change/preview?environment=string&merchantAccountId=string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"effectiveAt": "2024-01-01T00:00:00Z",
"items": [
{
"priceId": "string",
"quantity": 0,
"metadata": {}
}
],
"requestedByRef": "string"
}'const response = await fetch("https://api.vortex.nyc/v1/subscriptions/string/change/preview?environment=string&merchantAccountId=string", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"effectiveAt": "2024-01-01T00:00:00Z",
"items": [
{
"priceId": "string",
"quantity": 0,
"metadata": {}
}
],
"requestedByRef": "string"
})
});import requests
response = requests.post(
"https://api.vortex.nyc/v1/subscriptions/string/change/preview?environment=string&merchantAccountId=string",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"effectiveAt": "2024-01-01T00:00:00Z",
"items": [
{
"priceId": "string",
"quantity": 0,
"metadata": {}
}
],
"requestedByRef": "string"
},
)Response
{
"data": {},
"requestId": "string"
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}{
"error": {
"code": "bad_request",
"message": "string",
"requestId": "string",
"docsUrl": "string",
"details": {}
}
}