# List all invoices

Return a list of invoices across your sub-merchants.

Endpoint: GET /invoices
Version: partners-v1
Security: bearerAuth, basicAuth

## Query parameters:

  - `limit` (integer)
    Limit the number of invoices returned.

  - `page` (string)
    Specify the page of invoices returned.

  - `filter` (object)
    Filter invoices by the specified fields.

Filter semantics: `filter[field][operator]=value`.

Available filter operators:
- `eq` - equal (=)
- `ne` - not equal (!=)
- `gt` - greater than (>)
- `gte` - greater than or equal (>=)
- `lt` - less than (<)
- `lte` - less than or equal  (<=)

Filtering is allowed by the following fields:
  - `merchant_id` (`eq`) - filter by sub-merchant ID
  - `number` (`eq`)
  - `order_number` (`eq`)
  - `po_number` (`eq`)
  - `customer_id` (`eq`)
  - `advance_requested` (`eq`)
  - `created_at` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `fully_paid` (`eq`, `ne`)
  - `fully_paid_at` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_due` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_balance` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_scheduled` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_pending` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_refunded` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `archived` (`eq`, `ne`)

Example: `filter[merchant_id][eq]=MER456789`

Note: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 1

  - `limit` (integer)
    Example: 25

  - `page` (integer)
    Example: 1

  - `results` (array)

  - `results.id` (string)
    Unique identifier for the invoice.
    Example: PMMlaE5wbg0

  - `results.merchant_id` (string)
    ID of the sub-merchant this invoice belongs to.
    Example: MER456789

  - `results.source` (string)
    Enum: "QUICKBOOKS", "MERCHANT_USER", "ADMIN_USER", "CUSTOMER_USER", "API"

  - `results.customer_id` (string)
    ID of the customer being charged. For marketplace partners, the customer belongs to the partner. For single-merchant partners, the customer belongs to the sub-merchant.

  - `results.order_number` (string)
    Order number identifier.
    Example: 5055

  - `results.number` (string)
    Invoice number identifier.
    Example: Inv # 123

  - `results.po_number` (string)
    PO number identifier.
    Example: PO-555

  - `results.notes` (string)
    Additional notes for the Customer
    Example: Example of additional notes for Customer.

  - `results.line_items` (array)
    Line item data
    Example: []

  - `results.merchant_invoice_url` (string)
    The invoice PDF that you've uploaded to Resolve.
    Example: https://www.example.com/invoice.pdf

  - `results.resolve_invoice_url` (string)
    Resolve-issued invoice PDF with your invoice attached.
    Example: https://www.example.com/resolve-invoice.pdf

  - `results.resolve_invoice_status` (string)
    Shows current status of the Resolve-issued invoice PDF.
- `not_generated` - PDF wasn't created or queued for creation. Resolve PDFs
are generated when an invoice is sent.
- `processing` - PDF is in the process of being generated. Try to refetch the invoice
in a minute to get a `resolve_invoice_url` link.
- `completed` - PDF is generated, `resolve_invoice_url` points to the generated file.
    Enum: "not_generated", "processing", "completed"

  - `results.fully_paid` (boolean)
    Indicates whether the invoice is fully paid.
    Example: true

  - `results.fully_paid_at` (string)
    The date the invoice has been fully paid.
    Example: 2020-01-01T00:00:00.730Z

  - `results.advanced` (boolean)
    Indicates whether the invoice has been advanced.
    Example: false

  - `results.due_at` (string)
    The current due date for this invoice's payment.
    Example: 2020-02-01T00:00:00.750Z

  - `results.original_due_at` (string)
    The due date for this invoice at the time an advance was issued.
    Example: 2020-02-01T00:00:00.750Z

  - `results.invoiced_at` (string)
    The date this invoice was created in your system of record (Resolve or Quickbooks).
    Example: 2020-01-01T00:00:00.750Z

  - `results.advance_requested` (boolean)
    Indicated if advance was requested.
    Example: false

  - `results.terms` (string)
    The terms selected for this invoice.
    Enum: "due_upon_receipt", "net7", "net10", "net10th", "net15", "net20", "net30", "net45", "net60", "net75", "net90", "net120", "net180"

  - `results.amount_payout_due` (number)
    The original amount that Resolve owed on this invoice on the advance date.
    Example: 4000

  - `results.amount_payout_paid` (number)
    The amount that Resolve has paid out.
    Example: 2000

  - `results.amount_payout_pending` (number)
    The amount that Resolve has currently pending to be paid out.
    Example: 1000

  - `results.amount_payout_refunded` (number)
    The amount that Resolve has debited from due to refunds.
    Example: 500

  - `results.amount_payout_balance` (number)
    The amount remaining to be paid out.
    Example: 500

  - `results.payout_fully_paid` (boolean)
    The status of whether or not this invoice has been fully paid out.
    Example: false

  - `results.payout_fully_paid_at` (string)
    The date of when this invoice has been fully paid out.
    Example: 2020-01-02T00:00:00.730Z

  - `results.amount_balance` (number)
    Current balance due.
    Example: 2000

  - `results.amount_due` (number)
    Original amount due.
    Example: 4000

  - `results.amount_refunded` (number)
    Amount that has been refunded.
    Example: 0

  - `results.amount_pending` (number)
    Amount of total payments pending.
    Example: 1000

  - `results.amount_paid` (number)
    Amount of total payments applied to this invoice.
    Example: 1000

  - `results.amount_advance` (number)
    Amount of advance received.
    Example: 4000

  - `results.amount_additional_advance` (number)
    Amount of additional advance received.
    Example: 1000

  - `results.amount_advance_fee` (number)
    Fee for the amount of advance.
    Example: 10.75

  - `results.amount_advance_fee_refund` (number)
    Refunded fees for the amount of advance.
    Example: 10.75

  - `results.advance_rate` (number)
    The advance rate that was used to determine amount of advance.
    Example: 0.75

  - `results.advanced_at` (string)
    The date this invoice was advanced.
    Example: 2020-01-02T00:00:00.730Z

  - `results.amount_customer_fee_total` (number)
    The total amount of customer fees accrued.
    Example: 500

  - `results.amount_customer_fee_waived` (number)
    The total amount of customer fees waived.
    Example: 120

  - `results.amount_customer_fee_paid` (number)
    The total amount of customer fees paid.
    Example: 300

  - `results.amount_customer_fee_balance` (number)
    The current amount of customer fees owed.
    Example: 80

  - `results.created_at` (string)
    Date the invoice was created.
    Example: 2020-01-02T00:00:00.730Z

  - `results.updated_at` (string)
    Date the invoice was last updated.
    Example: 2020-01-02T00:00:00.730Z

  - `results.archived` (boolean)
    Boolean indicating if invoice is archived.
    Example: false

  - `results.invoice_payment_url` (string)
    Link to make invoice payments.
    Example: https://app.resolvepay.com/merchant/invoices/PMMlaE5wbg0

  - `results.canceled` (boolean)
    Indicates whether the invoice is canceled.
    Example: false

  - `results.canceled_at` (string)
    Date the invoice was canceled.
    Example: null

  - `results.voided` (boolean)
    Indicates whether the invoice is voided.
    Example: false

  - `results.voided_at` (string)
    Date the invoice was voided.
    Example: null

  - `results.amount_canceled` (number)
    Amount that has been canceled.
    Example: 0

  - `results.amount_voided` (number)
    Amount that has been voided.
    Example: 0

  - `results.amount_scheduled` (number)
    Amount of scheduled payments.
    Example: 0

  - `results.status` (string)
    Current payment status of the invoice.

  - `results.sent_at` (string)
    Date the invoice was sent.
    Example: 2020-01-01T00:00:00.730Z

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

