---
title: "Request plans"
method: POST
path: "/plans/search"
tags: ["Plans"]
---

# Request plans

`POST /plans/search`

## Request

- Base URL: `https://data-reporting-api.prod.feverup.com/v1`
- URL: `https://data-reporting-api.prod.feverup.com/v1/plans/search`
- Auth: OAuth 2
  - Password
  - Token URL: `/v1/auth/token`
- TypeScript: <https://skmtc.dev/feverup/apis/fever-reporting-api/docs/plans/search/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a request to get plans. The field plan_ids can be used to filter the plans by id.If empty, all plans will be returned.Optionally, the fields updated_date_utc_from and updated_date_utc_to can be used to restrict results to plans whose warehouse record was last updated within the given half-open UTC window (>= from, < to). Both bounds must be sent together; sending only one returns 422.The search will be processed asynchronously, being able to fetch the result from the provided search ID.

## Headers

- `user-id-to-impersonate` integer: User id from the user that you want to impersonate

## Request body

- PlansParams
  - `plan_ids` integer[]: List of ids of the plans to filter by.
  - `updated_date_utc_from` string: UTC start date for the warehouse last-updated filter (inclusive). Filters rows whose underlying warehouse record changed at or after this instant. If hour and minute are not specified, 00:00 is added by default
  - `updated_date_utc_to` string: UTC end date for the warehouse last-updated filter (exclusive). Filters rows whose underlying warehouse record changed strictly before this instant. If hour and minute are not specified, 00:00 is added by default

## Response `202`

Request was created successfully but is still running asynchronously.

- SearchStatus
  - `message` string, required: Message about the search status
  - `search_id` string, uuid, required: The search ID

## Other responses

- `408`: Request Timeout
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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