For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
      • GETGet All Groups
      • POSTCreate Group
      • GETGet Group
      • POSTUpdate Group
      • DELDelete Group
      • POSTGenerate JWT Token
      • POSTAdd Entities
      • POSTRemove Entities
        • GETGet All
        • GETDownload Invoices
        • GETGet Metrics
Logo
Sign inBook a demo
API ReferenceEntity GroupInvoice

Download Invoices

GET
https://api.mercoa.com/entityGroup/:entityGroupId/invoices/download
GET
/entityGroup/:entityGroupId/invoices/download
$curl -G https://api.mercoa.com/entityGroup/entg_8545a84e-a45f-41bf-bdf1-33b42a55812c/invoices/download \
> -H "Authorization: Bearer <token>" \
> -d format=CSV \
> -d excludeReceivables=true
1{
2 "url": "https://mercoa.com/download/bulk-invoices.csv",
3 "mimeType": "text/csv"
4}

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

Was this page helpful?
Previous

Get Metrics

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

entityGroupIdstringRequired
Entity Group ID or Entity Group ForeignID

Query parameters

formatenumOptional
Format of the file to download. Defaults to CSV.
Allowed values:
startDatedatetimeOptional

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

endDatedatetimeOptional

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

dateTypeenumOptional

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

orderByenumOptional

Field to order invoices by. Defaults to CREATED_AT.

orderDirectionenumOptional
Direction to order invoices by. Defaults to asc.
Allowed values:
searchstringOptional
Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.
metadataobjectOptional
Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
lineItemMetadataobjectOptional
Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
lineItemGlAccountIdstringOptional
Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.
payerIdstringOptional
Filter invoices by payer ID or payer foreign ID.
vendorIdstringOptional
Filter invoices by vendor ID or vendor foreign ID.
creatorUserIdstringOptional
Filter invoices by the ID or foreign ID of the user that created the invoice.
approverIdstringOptional
Filter invoices by assigned approver user ID. Only invoices with all upstream policies approved will be returned.
approverActionenumOptional

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.

Allowed values:
invoiceIdstringOptional
Filter invoices by invoice ID or invoice foreign ID.
statusenumOptional
Invoice status to filter on
paymentTypelist of enumsOptional
Filter invoices by recurring status
Allowed values:
invoiceTemplateIdstringOptional
Filter invoice by invoice template ID
excludePayablesbooleanOptional
Return only invoices that are receivable by the entity.
excludeReceivablesbooleanOptional
Return only invoices that are payable by the entity.
returnPayerMetadatabooleanOptional
Whether to return payer metadata in the response
returnVendorMetadatabooleanOptional
Whether to return vendor metadata in the response

Response

This endpoint returns an object.
urlstring
mimeTypestring

Errors

400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
409
Conflict
500
Internal Server Error
501
Unimplemented