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

Update Bulk Invoices (Sync)

PUT
https://api.mercoa.com/invoices
PUT
/invoices
$curl -X PUT https://api.mercoa.com/invoices \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "invoices": [
> {
> "invoiceId": "inv_21661ac1-a2a8-4465-a6c0-64474ba8181d",
> "amount": 100,
> "currency": "USD",
> "dueDate": "2024-01-31T00:00:00Z",
> "invoiceDate": "2024-01-01T00:00:00Z",
> "invoiceNumber": "INV-001",
> "lineItems": [
> {
> "amount": 50,
> "description": "Item 1",
> "quantity": 1
> },
> {
> "amount": 50,
> "description": "Item 2",
> "quantity": 1
> }
> ],
> "status": "NEW"
> }
> ]
>}'
1{
2 "data": [
3 {
4 "id": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
5 "foreignId": "YOUR-INVOICE-ID"
6 },
7 {
8 "foreignId": "YOUR-SECOND-INVOICE-ID",
9 "error": "Invoice update failed"
10 }
11 ]
12}
Update multiple invoices in bulk. This endpoint will process synchronously and return a list of invoices that were updated or failed to update.
Was this page helpful?
Previous

Approve 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 updated. 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