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 Attachments
        • POSTUpload Attachment
        • DELDelete Attachment
        • GETGet Invoice PDF
        • GETGet Check PDF
        • GETGet Payment Confirmation PDF
        • GETGet Source Email
Logo
Sign inBook a demo
API ReferenceInvoiceDocument

Get Source Email

GET
https://api.mercoa.com/invoice/:invoiceId/source-email
GET
/invoice/:invoiceId/source-email
$curl https://api.mercoa.com/invoice/in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9/source-email \
> -H "Authorization: Bearer <token>"
1{
2 "count": 1,
3 "hasMore": false,
4 "data": [
5 {
6 "id": "1234",
7 "status": "PROCESSED",
8 "subject": "Invoice #1234",
9 "from": "John Doe <john.doe@example.com>",
10 "to": "Jane Doe <jane.doe@example.com>",
11 "htmlBody": "<html><body><p>Hi Jane,</p><p>Please find attached the invoice for your recent purchase.</p><p>Thanks,</p><p>John</p></body></html>",
12 "textBody": "Hi Jane,\n\nPlease find attached the invoice for your recent purchase.\n\nThanks,\nJohn",
13 "createdAt": "2021-01-01T00:00:00Z",
14 "attachment": {
15 "filename": "invoice.pdf",
16 "contentType": "application/pdf"
17 }
18 }
19 ]
20}
Get the email subject and body that was used to create this invoice.
Was this page helpful?
Previous

Get payment link

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

Response

This endpoint returns an object.
countinteger
Total number of logs for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available.
hasMoreboolean
True if there are more logs available for the given filters.
datalist of objects

Errors

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