Skip to main content
POST
/
accounting
/
journalEntries
/
{journalEntryId}
/
Attachments
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/journalEntries/{journalEntryId}/Attachments \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --form file=@example-file
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": [
    {
      "id": "document id",
      "base64Encoded": true,
      "content": "content",
      "contentType": "application/pdf",
      "fileName": "invoice.pdf"
    }
  ]
}

Field support per integration

If you’re not using the Interactive Authentication Flow, make sure the query parameters environmentName and companyId are correctly populated. You can obtain these values by using the GET Environments and GET Companies endpoints available under the Authentication section.
file
File
required
Supported Request Parameters:
file
File
required

Headers

X-API-KEY
string
required

API key

Example:

"example value"

X-ACCOUNT-KEY
string
required

Account key

Example:

"example value"

Path Parameters

journalEntryId
string
required

Query Parameters

companyId
string
environmentName
string

Body

multipart/form-data
file
file
required

Response

200 - application/json
meta
object
data
object[]
I