The Subscription Plan Detail object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
qty integer required
plan string required
The Subscription Plan Detail object
{
  "id": "subscription-plan-detail_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "qty": 0,
  "plan": "plan_example"
}
GET /api/accounts/subscription-plan-detail?parent_id={id}

List subscription plan details by parent

Returns all subscription plan details belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of subscription plan detail objects belonging to the parent.

GET /api/accounts/subscription-plan-detail?parent_id={id}
curl https://api.overplane.dev/api/accounts/subscription-plan-detail?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "subscription-plan-detail_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "qty": 0,
      "plan": "plan_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/subscription-plan-detail

Create a subscription plan detail

Creates a new subscription plan detail object.

Body parameters

idx integer
parent_id string required
parent_type string required
qty integer required
plan string required

Returns

Returns the newly created subscription plan detail object if the call succeeded.

POST /api/accounts/subscription-plan-detail
curl https://api.overplane.dev/api/accounts/subscription-plan-detail \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"parent_type":"parent_type_example","qty":0,"plan":"plan_example"}'
Response
{
  "id": "subscription-plan-detail_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "qty": 0,
  "plan": "plan_example"
}
PATCH /api/accounts/subscription-plan-detail/{id}

Update a subscription plan detail

Updates the specified subscription plan detail by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the subscription plan detail to update.

Body parameters

idx integer
parent_id string
parent_type string
qty integer
plan string

Returns

Returns the updated subscription plan detail object.

PATCH /api/accounts/subscription-plan-detail/{id}
curl https://api.overplane.dev/api/accounts/subscription-plan-detail/subscription-plan-detail_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "subscription-plan-detail_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "qty": 0,
  "plan": "plan_example"
}
DELETE /api/accounts/subscription-plan-detail/{id}

Delete a subscription plan detail

Permanently deletes a subscription plan detail. This cannot be undone.

Path parameters

id string required

The identifier of the subscription plan detail to delete.

Returns

Returns a confirmation that the subscription plan detail has been deleted.

DELETE /api/accounts/subscription-plan-detail/{id}
curl https://api.overplane.dev/api/accounts/subscription-plan-detail/subscription-plan-detail_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "subscription-plan-detail_abc123",
  "deleted": true
}
POST /api/accounts/subscription-plan-detail/reorder

Reorder subscription plan details

Updates the sort order of subscription plan details within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/accounts/subscription-plan-detail/reorder
curl https://api.overplane.dev/api/accounts/subscription-plan-detail/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "subscription-plan-detail_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "qty": 0,
  "plan": "plan_example"
}