The Subscription Invoice object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string
parent_type string
document_type string
invoice string
The Subscription Invoice object
{
  "id": "subscription-invoice_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "document_type": "document_type_example",
  "invoice": "invoice_example"
}
GET /api/accounts/subscription-invoice?parent_id={id}

List subscription invoices by parent

Returns all subscription invoices 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 invoice objects belonging to the parent.

GET /api/accounts/subscription-invoice?parent_id={id}
curl https://api.overplane.dev/api/accounts/subscription-invoice?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "subscription-invoice_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "document_type": "document_type_example",
      "invoice": "invoice_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/subscription-invoice

Create a subscription invoice

Creates a new subscription invoice object.

Body parameters

idx integer
parent_id string
parent_type string
document_type string
invoice string

Returns

Returns the newly created subscription invoice object if the call succeeded.

POST /api/accounts/subscription-invoice
curl https://api.overplane.dev/api/accounts/subscription-invoice \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json"
Response
{
  "id": "subscription-invoice_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "document_type": "document_type_example",
  "invoice": "invoice_example"
}
PATCH /api/accounts/subscription-invoice/{id}

Update a subscription invoice

Updates the specified subscription invoice 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 invoice to update.

Body parameters

idx integer
parent_id string
parent_type string
document_type string
invoice string

Returns

Returns the updated subscription invoice object.

PATCH /api/accounts/subscription-invoice/{id}
curl https://api.overplane.dev/api/accounts/subscription-invoice/subscription-invoice_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "subscription-invoice_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "document_type": "document_type_example",
  "invoice": "invoice_example"
}
DELETE /api/accounts/subscription-invoice/{id}

Delete a subscription invoice

Permanently deletes a subscription invoice. This cannot be undone.

Path parameters

id string required

The identifier of the subscription invoice to delete.

Returns

Returns a confirmation that the subscription invoice has been deleted.

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

Reorder subscription invoices

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

Returns

Returns the reordered list.

POST /api/accounts/subscription-invoice/reorder
curl https://api.overplane.dev/api/accounts/subscription-invoice/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "subscription-invoice_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "document_type": "document_type_example",
  "invoice": "invoice_example"
}