curl --location --request POST '/clients//documents' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"userId": "TestUser"
},
"document": {
"documentType": "IN",
"customerNo": "543210",
"documentNo": "88776655",
"documentDate": "2025-02-27",
"dueDate": "2025-03-11",
"currency": "NOK",
"language": "en",
"kid": "500221850000200350786",
"marketingMessageCode": "0203",
"customerMessage": "Happy holidays!",
"salesOrderId": "B-0564311",
"purchaseOrderId": "",
"sellerReference": "C333",
"buyerReference": "A1982",
"additionalReference": "X99887",
"subCustomerNo": "654655",
"ledgerNote": "This is a note for the AR ledger",
"currencyAmounts": {
"exclVat": 5200,
"vat": 1300,
"inclVat": 6500
},
"distribution": {
"type": "M",
"einvoiceCode": 0
},
"einvoiceAddress": {
"address": "test@armresttest.no",
"addressScheme": "",
"operator": ""
},
"emailAddress": [
"test@armresttest.no"
],
"attachmentFiles": [],
"attachmentCodes": [],
"customCodes": [],
"documentLines": [
{
"lineNo": 1,
"lineType": "PLH",
"articleNo": "1300",
"articleName": "Comb",
"lineText": "Red comb",
"quantityUnit": "pcs",
"quantity": 1,
"volumeUnit": "",
"volume": 0,
"price": 200,
"itemGroup1": "500",
"itemGroup2": "",
"itemGroup3": "",
"currencyAmounts": {
"exclVat": 200,
"vat": 50,
"inclVat": 250
}
},
{
"lineNo": 2,
"lineType": "PLH",
"articleNo": "1500",
"articleName": "Pill",
"lineText": "Purple pill",
"quantityUnit": "dozen",
"quantity": 1,
"volumeUnit": "",
"volume": 0,
"price": 5000,
"itemGroup1": "600",
"itemGroup2": "",
"itemGroup3": "",
"currencyAmounts": {
"exclVat": 5000,
"vat": 150,
"inclVat": 6250
}
},
{
"lineNo": 3,
"lineType": "TXT",
"articleNo": "",
"articleName": "",
"lineText": "This is a text line with no amounts",
"quantityUnit": "",
"quantity": 0,
"volumeUnit": "",
"volume": 0,
"price": 0,
"itemGroup1": "",
"itemGroup2": "",
"itemGroup3": "",
"currencyAmounts": {
"exclVat": 0,
"vat": 0,
"inclVat": 0
}
}
]
}
}'