Subscription plans
7 routes. Paths are relative to https://api.intersink.com/v1.
- GET/subscription-plansList
- POST/subscription-plansCreate
- GET/subscription-plans/{id}Get one
- PUT/subscription-plans/{id}Replace
- PATCH/subscription-plans/{id}Update
- DELETE/subscription-plans/{id}Remove
- GET/subscription-plans/creator/{profileId}List by creator
List
GET/subscription-plans
Needs a signed-in user (Bearer token or access_token cookie).
The caller's own plans (optional ?status=, paginated).
Parameters
| Name | Type | Description |
|---|---|---|
| status | string, query | One of: "published", "draft", "archived". |
| page | number, query | Minimum 1. |
| limit | number, query | Minimum 1. |
Response
200. The payload in data is not described in the spec yet.
Create
POST/subscription-plans
Needs a signed-in user (Bearer token or access_token cookie).
Create a plan (title + price required; owner from JWT).
Request body application/json
| Field | Type | Description |
|---|---|---|
| titlerequired | string | At most 150 characters. |
| description | string | At most 2000 characters. |
| pricerequired | number | Minimum 0. |
| interval | string | One of: "day", "week", "month", "year". |
| status | string | One of: "published", "draft", "archived". |
Response
201. The payload in data is not described in the spec yet.
Get one
GET/subscription-plans/{id}
Needs a signed-in user (Bearer token or access_token cookie).
A single plan (owner-scoped). id = INTEGER.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
Replace
PUT/subscription-plans/{id}
Needs a signed-in user (Bearer token or access_token cookie).
PUT alias for update. id = INTEGER.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 150 characters. |
| description | string | At most 2000 characters. |
| price | number | Minimum 0. |
| interval | string | One of: "day", "week", "month", "year". |
| status | string | One of: "published", "draft", "archived". |
Response
200. The payload in data is not described in the spec yet.
Update
PATCH/subscription-plans/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Update any subset of fields (status:false = hide). Owner only. id = INTEGER.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 150 characters. |
| description | string | At most 2000 characters. |
| price | number | Minimum 0. |
| interval | string | One of: "day", "week", "month", "year". |
| status | string | One of: "published", "draft", "archived". |
Response
200. The payload in data is not described in the spec yet.
Remove
DELETE/subscription-plans/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Hard-delete a plan (owner only). id = INTEGER.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
List by creator
GET/subscription-plans/creator/{profileId}
Needs a signed-in user (Bearer token or access_token cookie).
PUBLIC: a creator's AVAILABLE plans (for fans). profileId = user_profile UUID.
Parameters
| Name | Type | Description |
|---|---|---|
| profileIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.