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
Logo
Sign inBook a demo
API ReferenceInvoice

Events

GET
https://api.mercoa.com/invoice/:invoiceId/events
GET
/invoice/:invoiceId/events
$curl https://api.mercoa.com/invoice/in_8545a84e-a45f-41bf-bdf1-33b42a55812c/events \
> -H "Authorization: Bearer <token>"
1{
2 "data": [
3 {
4 "id": "evt_a0f6ea94-0761-4a5e-a416-3c453cb7eced",
5 "data": {
6 "amount": 100,
7 "creatorEntityId": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
8 "creatorUserId": "user_e24fc81c-c5ee-47e8-af42-4fe29d895506",
9 "currency": "USD",
10 "dueDate": "2021-01-31T00:00:00Z",
11 "invoiceDate": "2021-01-01T00:00:00Z",
12 "invoiceNumber": "INV-123",
13 "lineItems": [
14 {
15 "amount": 100,
16 "category": "EXPENSE",
17 "currency": "USD",
18 "description": "Product A",
19 "glAccountId": "600394",
20 "id": "inli_26672f38-eb9a-48f1-a7a0-f1b855e38cd7",
21 "metadata": {
22 "key1": "value1",
23 "key2": "value2"
24 },
25 "name": "Product A",
26 "quantity": 1,
27 "serviceEndDate": "2021-01-31T00:00:00Z",
28 "serviceStartDate": "2021-01-01T00:00:00Z",
29 "unitPrice": 100
30 }
31 ],
32 "noteToSelf": "For the month of January",
33 "payerId": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
34 "paymentDestinationId": "pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18",
35 "paymentDestinationOptions": {
36 "type": "check",
37 "delivery": "MAIL",
38 "printDescription": true
39 },
40 "paymentSourceId": "pm_4794d597-70dc-4fec-b6ec-c5988e759769",
41 "status": "NEW",
42 "vendorId": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d"
43 },
44 "webhookIds": [
45 "webhook_12345"
46 ],
47 "createdAt": "2024-01-01T00:00:00.000Z",
48 "userId": "user_e24fc81c-c5ee-47e8-af42-4fe29d895506"
49 }
50 ],
51 "count": 1,
52 "hasMore": false
53}
Get all events for an invoice
Was this page helpful?
Previous

Update invoice line item

Next
Built with

Authentication

AuthorizationBearer

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

Path parameters

invoiceIdstringRequired
Invoice ID or Invoice ForeignID

Query parameters

startDatedatetimeOptional
Start date filter. If not provided, events from the start of time will be returned.
endDatedatetimeOptional
End date filter. If not provided, events to the end of time will be returned.
limitintegerOptional
Number of events to return. Limit can range between 1 and 100, and the default is 50.
startingAfterstringOptional
The ID of the event to start after. If not provided, the first page of events will be returned.

Response

This endpoint returns an object.
datalist of objects
countinteger
hasMoreboolean

Errors

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