Global search

GET /api/v1/search

Search across products, variants, customers, invoices, vendors, and more.

Operation ID: search_entities_api_v1_search_get · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Query

entity_type string

Limit to: products, variants, customers, invoices, vendors, transactions, journal_entries, ledgers, emails

date_from string

Results after this date (ISO 8601: YYYY-MM-DD)

date_to string

Results before this date (ISO 8601: YYYY-MM-DD)

search_term string required
limit integer

Pagination limit

cursor string

Cursor for pagination

direction string default: next

Pagination direction: 'next' or 'prev'

include_total_count boolean default: False

Whether to include total count (expensive - avoid if possible)

sort_by string

Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.

descending boolean default: True

Sort direction: true for descending (newest/largest first), false for ascending

Responses

200 Successful Response

success boolean

Whether search completed successfully.

results SearchResults requiredSearchResults

Search results by entity type.

13 fields
products array · object

Matching products.

variants array · object

Matching product variants.

invoices array · object

Matching invoices.

bills array · object

Matching bills.

inventory_orders array · object

Matching inventory orders.

shipments array · object

Matching shipments.

customers array · object

Matching customers.

vendors array · object

Matching vendors.

journal_entries array · object

Matching journal entries.

transactions array · object

Matching transactions.

ledgers array · object

Matching ledger accounts.

emails array · object

Matching emails.

metadata SearchMetadata requiredSearchMetadata

Search metadata.

2 fields
total_count integer required

Total matches across all entity types.

search_term string required

The search term used.

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object