Skip to main content
GET
/
accounting
/
invoices
/
{invoiceId}
/
document
cURL
curl --request GET \
  --url https://api.maesn.dev/accounting/invoices/{invoiceId}/document \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>'
{
  "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

Please note that the content in output is base64-encoded.
Supported Response Fields:
id
string
fileName
string
contentType
string
base64Encoded
boolean
content
string
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string
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 Companies endpoint available under the Authentication section. Please use the id field as the companyId and the environmentId field as the environmentName.
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string
Supported Response Fields:
fileName
string
contentType
string
base64Encoded
boolean
content
string

Headers

X-API-KEY
string
required

API key

X-ACCOUNT-KEY
string
required

Account key

Path Parameters

invoiceId
string
required

Query Parameters

companyId
string

Response

200 - application/json
meta
object
data
object
I