InvoiceComment

Update

POST
Edit a comment on this invoice

Path parameters

invoiceIdstringRequired
commentIdstringRequired

Request

This endpoint expects an object.
text
stringRequired
userId
stringOptional

Response

This endpoint returns an object
id
string
text
string
createdAt
datetime
updatedAt
datetime
user
objectOptional
associatedApprovalAction
objectOptional
If an approval action has triggered the generation of this comment, returns the associated approval action and actor
POST
1curl -X POST https://api.mercoa.com/invoice/inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff/comment/ic_3d61faa9-1754-4b7b-9fcb-88ff97f368ff \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "text": "This is a comment",
6 "userId": "user_e24fc81c-c5ee-47e8-af42-4fe29d895506"
7}'
200Successful
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}