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
      • GETSearch invoices
      • POSTCreate
      • GETGet
      • POSTUpdate
      • DELDelete
      • GETEvents
        • POSTCreate Bulk Invoices (Sync)
        • PUTUpdate Bulk Invoices (Sync)
        • POSTApprove Bulk Invoices (Sync)
        • GETDownload Bulk Invoices (Sync)
Logo
Sign inBook a demo
API ReferenceInvoiceBulk

Approve Bulk Invoices (Sync)

POST
https://api.mercoa.com/invoices/approve
POST
/invoices/approve
$curl -X POST https://api.mercoa.com/invoices/approve \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "invoices": [
> {
> "invoiceId": "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9",
> "userId": "user_e24fc81c-c5ee-47e8-af42-4fe29d895506",
> "text": "This is a reason for my action"
> }
> ]
>}'
1{
2 "data": [
3 {
4 "id": "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9"
5 },
6 {
7 "id": "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9",
8 "error": "Invoice approval failed"
9 }
10 ]
11}
Approve multiple invoices in bulk. This endpoint will process synchronously and return a list of invoices that were approved or failed to approve.
Was this page helpful?
Previous

Download Bulk Invoices (Sync)

Next
Built with

Authentication

AuthorizationBearer

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

Query parameters

emitWebhooksbooleanOptionalDefaults to false
If true, webhooks will be emitted for each invoice that is approved. By default, webhooks are not emitted.

Request

This endpoint expects an object.
invoiceslist of objectsRequired

Response

This endpoint returns an object.
datalist of objects

Errors

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