Update Subscription

Update subscription.

 

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the subscription

 

Request Body Parameter
Attribute Type Required Description
started_at string Yes When subscription started
company number Yes The unique identifier of the company
quantity number Yes
plan number Yes The unique identifier of the plan
canceled_at No When the subscription canceled
reason number No The unique identifier of the reason

 

Example Request & Response


$ curl https://api.custerem.com/<org_id>/subscriptions/<id>/ \
-X PUT \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "started_at": "2022-04-09 09:20",
    "company": 38,
    "quantity": 2,
    "plan": 5
}'

 

204 No Content

{
    "started_at": "2022-04-09 09:20",
    "company": 38,
    "quantity": 2,
    "plan": 5
}

 

404 Not Found

{
    "status_code": 404,
    "message": "Subscription with id 3 not found"
}