# Searches for invoices using predefined parameters

Searches for invoices using predefined parameters

Endpoint: POST /invoices/{tenantId}/search
Version: v1-2025-04-18
Security: knox-authorizer

## Security:

  - `knox-authorizer` (unknown)
    http bearer JWT

## Path parameters:

  - `tenantId` (string, required)
    The id of the tenant being accessed.

## Query parameters:

  - `exclusiveStartKey` (string)
    The start key for the search, for paging support

  - `fieldsToReturn` (string)
    The fields that you want to retrieve; if omitted, the entire object is returned

## Request body:

  - `application/json` (unknown)
    The invoice that you would like to be saved.

## Request fields (application/json):

  - `amount_paid` (array)

  - `balance_due` (array)

  - `batch_id` (array)

  - `bill_to_contact_id` (string)

  - `bill_to_organization_id` (string)

  - `bill_to_type` (string)

  - `business_unit_id` (string, required)
    The business unit

  - `date` (array)

  - `date_due` (array)

  - `id` (array)

  - `number` (array)

  - `purchase_order_number` (array)

  - `total` (array)

  - `total_in_base_currency` (array)

## Response 200:

  - `200` (unknown)
    The invoice search was saved successfully.

## Response 200 fields (application/json):

  - `Items` (array)

  - `Items.amount_paid` (number)

  - `Items.balance_due` (number)

  - `Items.base_currency_symbol` (string)

  - `Items.batch_id` (string)

  - `Items.bill_to_contact_id` (string)

  - `Items.bill_to_organization_id` (string)

  - `Items.bill_to_type` (string)

  - `Items.business_unit_id` (string, required)
    The business unit

  - `Items.currency_symbol` (string)

  - `Items.date` (string)

  - `Items.date_due` (string)

  - `Items.id` (string)

  - `Items.memo` (string)

  - `Items.number` (number)

  - `Items.total` (number)

  - `Items.total_in_base_currency` (number)

  - `LastEvaluatedKey` (string)

## Response 200 headers (application/json):

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 400:

  - `400` (unknown)
    The invoice you supplied was invalid.

## Response 400 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized.

## Response 401 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 403:

  - `403` (unknown)
    Forbidden.

## Response 403 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 404:

  - `404` (unknown)
    The resource could not be found

## Response 404 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 409:

  - `409` (unknown)
    The invoice could not be saved because it refers to/depends on a non-existent object.

## Response 409 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 429:

  - `429` (unknown)
    Limit exceeded... unable to add invoice based on tenant limits.

## Response 429 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 500:

  - `500` (unknown)
    General server error.

## Response 500 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

