Skip to main content
PUT
/
api
/
v1
/
subscriptions
/
{subscription_id}
Update Subscription
curl --request PUT \
  --url http://localhost:8000/api/v1/subscriptions/{subscription_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subscription_plan_id": 123,
  "starts_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "subscription_type": "auto_renew"
}
'
{
  "google_ads_customer_id": 123,
  "subscription_plan_id": 123,
  "starts_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "subscription_type": "auto_renew",
  "id": 123,
  "date_added": "2023-11-07T05:31:56Z",
  "date_updated": "2023-11-07T05:31:56Z",
  "cancelled_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

subscription_id
integer
required

Body

application/json

Schema for updating Subscription.

subscription_plan_id
integer | null
starts_at
string<date-time> | null
expires_at
string<date-time> | null
subscription_type
enum<string> | null
Available options:
auto_renew,
one_time

Response

Successful Response

Schema for reading Subscription.

google_ads_customer_id
integer
required
subscription_plan_id
integer
required
starts_at
string<date-time>
required
expires_at
string<date-time>
required
subscription_type
enum<string>
required
Available options:
auto_renew,
one_time
id
integer
required
date_added
string<date-time>
required
date_updated
string<date-time>
required
cancelled_at
string<date-time> | null