---
title: "List usage records"
method: POST
path: "/usage-records/search"
tags: ["Usage Records"]
---

# List usage records

`POST /usage-records/search`

Lists usage records. Also accepts filters/sort for a filtered query.

## Request body

- TypesUsageRecordFilter
  - `currency` string
  - `customer_external_id` string
  - `customer_id` string
  - `end_time` string, date-time
  - `expand` string
  - `filters` TypesFilterCondition[] — Generic predicate and ordering escape hatch, for comparisons that have no dedicated field below — a range such as period_end at or after a cutoff goes here.
    - `data_type` 'string' | 'number' | 'date' | 'array'
    - `field` string
    - `operator` 'eq' | 'contains' | 'not_contains' | 'gt' | 'lt' | 'gte' | 'in' | 'not_in' | 'before' | 'after'
    - `value` TypesValue
      - `array` string[]
      - `boolean` boolean
      - `date` string
      - `number` number
      - `string` string
  - `limit` integer
  - `offset` integer
  - `order` 'asc' | 'desc'
  - `period_end` string, date-time
  - `period_start` string, date-time — Exact-match on the window boundaries. Together with SubscriptionID these identify a single row: they are the columns the table's unique index is built on.
  - `plan_id` string
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `subscription_id` string
  - `synced` boolean

## Response `200`

OK

- ListUsageRecordsResponse
  - `items` UsageRecordResponse[]
    - `amount` number
    - `created_at` string, date-time
    - `created_by` string
    - `currency` string
    - `customer_external_id` string
    - `customer_id` string
    - `environment_id` string
    - `id` string
    - `period_end` string, date-time
    - `period_start` string, date-time
    - `plan_id` string
    - `quantity` number
    - `status` 'published' | 'deleted' | 'archived'
    - `subscription_id` string
    - `synced` boolean
    - `syncs` object
    - `tenant_id` string
    - `updated_at` string, date-time
    - `updated_by` string
  - `pagination` TypesPaginationResponse
    - `limit` integer
    - `offset` integer
    - `total` integer

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/d567e8585c2e/schema)
