Skip to main content
GET
/
subscriptions
List subscriptions
curl --request GET \
  --url https://api.piriod.com/subscriptions/ \
  --header 'Authorization: <api-key>' \
  --header 'x-simple-workspace: <x-simple-workspace>'
{
  "count": 142,
  "results": [
    {
      "customer": "<string>",
      "document": 123,
      "date_start": "2023-12-25",
      "next_billing": "2023-12-25",
      "lines": [
        {
          "plan": "<string>",
          "quantity": 2,
          "id": "<string>",
          "coupon": "<string>",
          "coupon_redemptions": 123,
          "created": "2023-11-07T05:31:56Z",
          "updated": "2023-11-07T05:31:56Z"
        }
      ],
      "id": "<string>",
      "previous_billing": "2023-12-25",
      "billing_cycles": 123,
      "next_billing_cycle": 1,
      "expiration_days": 10,
      "collection_scheme": "send_invoice",
      "default_source": "<string>",
      "custom_change": 2,
      "coupon": "<string>",
      "coupon_redemptions": 123,
      "require_reference": false,
      "note": "<string>",
      "orgunit": 123,
      "status": "active",
      "status_description": "<string>",
      "needs_attention": "2023-11-07T05:31:56Z",
      "needs_attention_reason": "biller_issue",
      "cancel_reason": "custom",
      "cancelled": "2023-11-07T05:31:56Z",
      "paused": "2023-11-07T05:31:56Z",
      "paused_reason": "not_specified",
      "pause_until": "2023-12-25",
      "addons": [
        {
          "addon": "<string>",
          "quantity": 2,
          "addon_redemptions": 123,
          "rates": [
            {
              "billing_cycle": 123,
              "percentage": 123,
              "description": "<string>"
            }
          ]
        }
      ],
      "references": [
        {
          "date": "2023-12-25",
          "document": "<string>",
          "serial": "<string>",
          "date_end": "2023-12-25",
          "description": "<string>"
        }
      ],
      "test_mode": true,
      "created": "2023-11-07T05:31:56Z",
      "updated": "2023-11-07T05:31:56Z"
    }
  ],
  "next": "<string>",
  "previous": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://piriod-d406ac55.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Query Parameters

page
integer
default:1

Page number to retrieve (1-indexed).

Required range: x >= 1
page_size
integer
default:20

Number of items per page.

Required range: 1 <= x <= 100
ordering
string

Field to sort results by. Prefix with - for descending order (e.g. -created).

customer
string
status
enum<string>
Available options:
active,
paused,
cancelled,
finalized,
needs_attention
next_billing
string<date>
date_start
string<date>
document
integer
lines
string

Filter by linked line ID.

addons
integer
coupon
string
cancelled
string<date-time>
cancel_reason
string
paused
string<date-time>
paused_reason
string
needs_attention
string<date-time>
needs_attention_reason
string
instant
boolean

Compute on-the-fly billing for the response.

Response

200 - application/json

Paginated subscription list.

count
integer
required

Total number of items matching the filter.

Example:

142

results
object[]
required

The items in the current page.

next
string<uri> | null

URL of the next page, or null if last page.

previous
string<uri> | null

URL of the previous page, or null if first page.