Search purchase types

Operation ID: searchPurchaseType

Group: Accounting › Purchase Types

Open in the interactive reference

POST /accounting/purchase-types/search

Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.

Searches purchase types. You can filter by id, name, or status. Results are returned newest first, and each item has the same fields as GET accounting/purchase-types/:id.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.

Request body

Required, application/json: searchPurchaseTypeInput.

Field Type Required Description
filters object no The filters to apply. A purchase type must match every filter you send. Omit to return all purchase types. Example: {"status":"active"}.
filters.id string no Limits results to the purchase type with this identifier.
filters.name string no Limits results to the purchase type with this exact name, for example 'New purchase'. The name is unique within the tenant, so this returns at most one type. The match is case-sensitive.
filters.status string no Limits results to purchase types in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no type.
page object no Pagination controls. Omit for the first page. Example: {"size":50}.
page.cursor string no The cursor from the previous response's pagination.nextCursor. Omit for the first page.
page.size number no The number of purchase types per page. Defaults to 50. A value above 200 is treated as 200, not rejected.
{}

Response

200 Success

Under data (searchPurchaseTypeOutput):

Field Type Required Description
items array<object> yes The purchase types on this page, most recently created first. An empty array when nothing matches.
items[].id string yes The unique identifier for the purchase type.
items[].name string yes The name of the purchase type, for example 'New purchase'. Unique within the tenant, ignoring case.
items[].description string no What the purchase type is for.
items[].status string yes The lifecycle status of the purchase type. Possible values: 'active', 'inactive'. Only an active type can be chosen for a new purchase order. An inactive type stays readable so orders that carry it still resolve.
items[].lastModifiedDate date-time yes The date and time the purchase type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
pagination object yes The pagination cursor for this page.
pagination.nextCursor string no The cursor for the next page. Pass it as page.cursor. Absent on the last page.
pagination.hasMore boolean yes True when more matches remain beyond this page.
{
  "data": {
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "<name>",
        "description": "<description>",
        "status": "<status>",
        "lastModifiedDate": "2026-01-15T09:30:00.000Z"
      }
    ],
    "pagination": {
      "nextCursor": "<nextCursor>",
      "hasMore": true
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Statuses