entity > invoice

Get All

Get invoices for an entity with the given filters.

get/entity/{entityId}/invoices

Request

  • Base URL: https://api.mercoa.com
  • URL: https://api.mercoa.com/entity/{entityId}/invoices
  • Auth: HTTP bearer

Path parameters

entityIdstring required

Entity ID or Entity ForeignID

Query parameters

excludePayablesboolean

Return only invoices that are receivable by the entity.

excludeReceivablesboolean

Return only invoices that are payable by the entity.

startDatestring date-time

Start date filter. Defaults to CREATED_AT unless specified the dateType is specified

endDatestring date-time

End date filter. Defaults to CREATED_AT unless specified the dateType is specified

dateType'INVOICE_DATE' | 'DEDUCTION_DATE' | 'DUE_DATE' | 'SETTLEMENT_DATE' | 'CREATED_AT' | 'UPDATED_AT'

Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.

orderBy'AMOUNT' | 'DUE_DATE' | 'CREATED_AT' | 'UPDATED_AT' | 'DEDUCTION_DATE' | 'INVOICE_DATE' | 'SETTLEMENT_DATE' | 'INVOICE_NUMBER' | 'VENDOR_NAME' | 'PAYER_NAME'

Field to order invoices by. Defaults to CREATED_AT.

orderDirection'ASC' | 'DESC'

Direction to order invoices by. Defaults to asc.

limitinteger

Number of invoices to return. Limit can range between 1 and 100, and the default is 10.

startingAfterstring

The ID of the invoice to start after. If not provided, the first page of invoices will be returned.

keystring required

Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.

keystring required

Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.

lineItemGlAccountIdstring

Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.

searchstring

Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.

payerIdstring

Filter invoices by payer ID or payer foreign ID.

vendorIdstring

Filter invoices by vendor ID or vendor foreign ID.

creatorUserIdstring

Filter invoices by the ID or foreign ID of the user that created the invoice.

approverIdstring

Filter invoices by assigned approver user ID.

approverAction'NONE' | 'APPROVE' | 'REJECT'

Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.

approverCountstring

Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., ">3", "<5", ">=2", "<=4").

invoiceIdstring

Filter invoices by invoice ID or invoice foreign ID.

status'UNASSIGNED' | 'DRAFT' | 'NEW' | 'APPROVED' | 'SCHEDULED' | 'PENDING' | 'PAID' | 'ARCHIVED' | 'REFUSED' | 'CANCELED' | 'FAILED'

Invoice status to filter on.

paymentTypeInvoiceTypesPaymentType[]

Filter invoices by payment type.

returnPayerMetadataboolean

Whether to return payer metadata in the response

returnVendorMetadataboolean

Whether to return vendor metadata in the response

returnPaymentTimingboolean

Whether to return payment timing in the response

Response

Response with status 200

countinteger required

Total number of notifications for the given start and end date filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available.

hasMoreboolean required

True if there are more notifications available for the given start and end date filters.

Changes

No recorded changes to this operation across all 1 revision of this API.