Skip to main content
GET
/
customers
List customers
curl --request GET \
  --url https://api.piriod.com/customers/ \
  --header 'Authorization: <api-key>' \
  --header 'x-simple-workspace: <x-simple-workspace>'
{
  "count": 142,
  "results": [
    {
      "name": "<string>",
      "address": "<string>",
      "country": {
        "id": "CL",
        "name": "Chile",
        "code": "+56",
        "has_regulation": true,
        "currencies": [
          "CLP"
        ]
      },
      "state": {
        "id": 123,
        "name": "<string>",
        "country": "CL"
      },
      "id": "cus_01H8XYZ123ABC",
      "currency": "CLP",
      "email": "jsmith@example.com",
      "phone": "<string>",
      "website": "<string>",
      "zip_code": "<string>",
      "manager": "<string>",
      "reference": "<string>",
      "tax_id": "<string>",
      "tax_settings": {},
      "metadata": {},
      "send_invoices": true,
      "send_collections": true,
      "send_vouchers": true,
      "status": "active",
      "contacts": [
        {
          "name": "<string>",
          "email": "jsmith@example.com",
          "id": "con_01H8XYZ123ABC",
          "customer": "<string>",
          "orgunit": "<string>",
          "phone": "<string>",
          "invoicing": true,
          "collections": true,
          "created": "2023-11-07T05:31:56Z",
          "updated": "2023-11-07T05:31:56Z"
        }
      ],
      "sources": [
        "<string>"
      ],
      "aggregations": {
        "sales": 123,
        "sales_current_period": 123,
        "balance": 123
      },
      "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://docs.piriod.com/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).

country
string

Filter by country ID.

email
string
name
string
tax_id
string
created
string<date-time>

Use lookups: created__gte, created__lte.

subscriptions
string

Filter by linked subscription ID.

sources
string

Filter by linked source ID.

Response

Paginated customer 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.