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
        • GETGet All
        • POSTCreate
        • GETGet
        • POSTUpdate
        • DELDelete
Logo
Sign inBook a demo
API ReferenceInvoiceComment

Create

POST
https://api.mercoa.com/invoice/:invoiceId/comment
POST
/invoice/:invoiceId/comment
$curl -X POST https://api.mercoa.com/invoice/in_3d61faa9-1754-4b7b-9fcb-88ff97f368ff/comment \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "text": "This is a comment",
> "userId": "user_e24fc81c-c5ee-47e8-af42-4fe29d895506"
>}'
1{
2 "id": "ic_b3525b66-da94-4525-9f31-426bcf657128",
3 "text": "This is a comment",
4 "createdAt": "2021-01-01T00:00:00Z",
5 "updatedAt": "2021-01-01T00:00:00Z",
6 "user": {
7 "id": "user_ec3aafc8-ea86-408a-a6c1-545497badbbb",
8 "roles": [
9 "admin",
10 "approver"
11 ],
12 "createdAt": "2024-01-01T00:00:00Z",
13 "updatedAt": "2024-01-01T00:00:00Z",
14 "foreignId": "MY-DB-ID-12345",
15 "email": "john.doe@acme.com",
16 "name": "John Doe"
17 }
18}
Add a comment to this invoice
Was this page helpful?
Previous

Get

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

Request

This endpoint expects an object.
textstringRequired
userIdstringOptional
The ID or the Foreign ID of the user who created the comment.

Response

This endpoint returns an object.
idstring
textstring
createdAtdatetime
updatedAtdatetime
userobject
associatedApprovalActionobject
If an approval action has triggered the generation of this comment, returns the associated approval action and actor

Errors

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