entity-group > invoice

Download Invoices

Get a URL to download invoices for an entity group as a CSV/JSON file.

get/entityGroup/{entityGroupId}/invoices/download

Request

  • Base URL: https://api.mercoa.com
  • URL: https://api.mercoa.com/entityGroup/{entityGroupId}/invoices/download
  • Auth: HTTP bearer

Path parameters

entityGroupIdstring required

Entity Group ID or Entity Group ForeignID

Query parameters

format'CSV' | 'JSON'

Format of the file to download. Defaults to CSV.

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.

searchstring

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

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.

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. Only invoices with all upstream policies approved will be returned.

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.

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 recurring status

invoiceTemplateIdstring

Filter invoice by invoice template ID

excludePayablesboolean

Return only invoices that are receivable by the entity.

excludeReceivablesboolean

Return only invoices that are payable by the entity.

returnPayerMetadataboolean

Whether to return payer metadata in the response

returnVendorMetadataboolean

Whether to return vendor metadata in the response

Response

Response with status 200

urlstring required
mimeTypestring required

Changes

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