---
title: "Query accounting periods"
method: POST
path: "/accounting_periods/search"
tags: ["Accounting Periods"]
---

# Query accounting periods

`POST /accounting_periods/search`

## Request

- Base URL: `https://us.api.flexprice.io/v1`
- URL: `https://us.api.flexprice.io/v1/accounting_periods/search`
- Auth: API key in header `x-api-key`

Use when listing the monthly accounting periods revenue recognition posts to, by period status or a period start range. Returns a paginated list.

## Request body

- AccountingperiodFilter
  - `accounting_period_ids` string[]
  - `end_time` string, date-time
  - `expand` string
  - `filters` TypesFilterCondition[]
    - `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_statuses` TypesAccountingPeriodStatus[]
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'

## Response `200`

OK

- ListAccountingPeriodsResponse
  - `items` AccountingPeriodResponse[]
    - `created_at` string, date-time
    - `id` string
    - `period_end` string, date-time
    - `period_start` string, date-time
    - `period_status` 'open' | 'closed'
    - `status` 'published' | 'deleted' | 'archived'
    - `updated_at` string, date-time
  - `pagination` TypesPaginationResponse
    - `limit` integer
    - `offset` integer
    - `total` integer

## Other responses

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

## Changes

- **2026-10-29** `d40ad451804c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/accounting_periods/search/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) - [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flexprice/apis/flexprice-api/revisions/e1348d61034c?raw)
