Update Subscription
Developing
Update Subscription End Date API#
This API allows updating a customer's subscription end date.Endpoint#
PUT https://api.stykite.com/v1/company/:companyId/country/:countryId/customer/:customerIdentifier/subscription
Description#
This API endpoint updates the end date of a customer's subscription.Request Parameters#
Path Parameters#
companyId (string, required): The unique identifier of the company.
countryId (string, required): The unique identifier of the country.
customerIdentifier (string, required): The unique identifier of the customer.
Authorization (string, required): The authorization token in the format Bearer <token>.
Content-Type (string, required): Must be set to application/json.
Body Parameters#
subscription_tsid (string, required): The unique identifier of the subscription.
end_date (number, required): The timestamp (in milliseconds) representing the new end date for the subscription.
Example Request#
Response#
201 Accepted: Subscription end date updated successfully.
400 Bad Request: Invalid parameters.
401 Unauthorized: Missing or invalid authorization token.
404 Not Found: Subscription or customer not found.
500 Internal Server Error: Unexpected server error.
Notes#
Ensure the Authorization header contains a valid bearer token.
Double-check that the subscription_tsid is correct and belongs to the specified customer.
The end_date must be a valid timestamp.
For further assistance, contact Stykite support.Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"subscription_tsid" : "SUA-0K6FC7CCNBBQD",
"end_date" : 1742797511000
}
Request Code Samples
curl --location --request PUT 'https://sandbox.api.stykite.com/v1/company//country//customer//subscription' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"subscription_tsid" : "SUA-0K6FC7CCNBBQD",
"end_date" : 1742797511000
}'
Responses
application/json Modified at 2025-03-24 06:36:43