Skip to main content
POST
Upload invoice

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Body

application/json
externalId
string
required

Your system's id for the record. Pushing the same externalId again updates the record instead of creating a second one.

Required string length: 1 - 255
invoiceNumber
string
required

Invoice number; at most 18 digits in total

Required string length: 1 - 100
Example:

"2026-1042"

companyId
string<uuid>
required

MSPortal company (client) id, from GET /api/public/v1/companies. Its portal users see the record.

invoiceDate
string
required
Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-10-01"

total
number
required

Invoice total; must be greater than 0

Required range: 0 < x <= 1000000000000
Example:

1190

dueDate
string
Pattern: ^\d{4}-\d{2}-\d{2}$
paidDate
string

Set when paid; marks the invoice closed

Pattern: ^\d{4}-\d{2}-\d{2}$
status
string

Status shown in the table

Maximum string length: 100
Example:

"Open"

invoiceType
string

Defaults to Standard

Maximum string length: 100
currency
string

ISO 4217 currency code

Pattern: ^[A-Za-z]{3}$
Example:

"EUR"

subtotal
number
Required range: -1000000000000 <= x <= 1000000000000
salesTax
number
Required range: -1000000000000 <= x <= 1000000000000
payments
number
Required range: -1000000000000 <= x <= 1000000000000
balance
number

Amount still due; defaults to 0 when paidDate is set, otherwise total minus payments

Required range: -1000000000000 <= x <= 1000000000000
reference
string
Maximum string length: 255
customerPo
string
Maximum string length: 100
pdf
object

The document the client opens in the portal. Required the first time an externalId is pushed; omit it on a later push to keep the stored PDF.

Response

invoice updated

data
object
required