Subscriptions

get
All Subscriptions

https://yoursite.mavenseed.com/api/v1/subscriptions
Retrieve all subscriptions
Request
Response
Path Parameters
page
optional
integer
Results are paginated.
Headers
Authorization
required
string
Auth token
200: OK
Returns an array of members. Only the first 20 are returned. Passing the page param will paginate the results.
[
{
"id": 12,
"customer_id": null,
"subscription_plan_id": null,
"stripe_id": null,
"expiration": null,
"status": null,
"created_at": "2019-09-16T13:40:50.336-04:00",
"updated_at": "2019-09-16T13:40:50.336-04:00"
},
{
"id": 18,
"customer_id": 1956,
"subscription_plan_id": 14,
"stripe_id": "sub_G0EDCYMgIpWTS0",
"expiration": "2019-11-16T09:45:59.000-05:00",
"status": "active",
"created_at": "2019-10-16T10:45:27.077-04:00",
"updated_at": "2019-10-16T11:02:19.573-04:00"
}
]

get
Show Subscription

https://yoursite.mavenseed.com/api/v1/subscriptions/:id
Retrieve a single subscription
Request
Response
Headers
Authorization
required
string
Auth token
200: OK
{
"id": 12,
"customer_id": null,
"subscription_plan_id": null,
"stripe_id": null,
"expiration": null,
"status": null,
"created_at": "2019-09-16T13:40:50.336-04:00",
"updated_at": "2019-09-16T13:40:50.336-04:00"
}
404: Not Found
null

post
Create Subscription

https://yoursite.mavenseed.com/v1/subscriptions
Create a subscription.
Request
Response
Headers
Authorization
required
string
Auth Token
Form Data Parameters
customer_id
required
integer
ID of customer to attach subscription to
subscription_plan_id
required
integer
ID of subscription plan for customoer
stripe_id
optional
string
Stripe subscription id
expiration
optional
string
Expiration of subscription in datetime format
status
required
integer
0 - active, 1 - past_due, 2- canceled, 3 - unpaid, 4 - free
200: OK
{
"id": 12,
"customer_id": null,
"subscription_plan_id": null,
"stripe_id": null,
"expiration": null,
"status": null,
"created_at": "2019-09-16T13:40:50.336-04:00",
"updated_at": "2019-09-16T13:40:50.336-04:00"
}

patch
Update Subscription

https://yoursite.mavenseed.com/v1/subscriptions/:id
Update a single subscription. All of the above properties in create subscription are valid.
Request
Response
Headers
Authorization
optional
string
Auth token
200: OK
{
"id": 12,
"customer_id": null,
"subscription_plan_id": null,
"stripe_id": null,
"expiration": null,
"status": null,
"created_at": "2019-09-16T13:40:50.336-04:00",
"updated_at": "2019-09-16T13:40:50.336-04:00"
}

delete
Delete a Subscription

https://yoursite.mavenseed.com/v1/subscriptions/:id
Delete a subscription.
Request
Response
Headers
Authorization
required
string
Auth token.
200: OK
‚Äč