curl --location --request POST '/clients//documents/batches' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"userId": "TestUser"
},
"documents": [
{
"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": "kg",
"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
}
}
]
},
{
"documentType": "IN",
"customerNo": "765432",
"documentDate": "2025-03-05",
"dueDate": "2025-03-19",
"emailAddress": [
"test@armresttest.com"
],
"documentLines": [
{
"lineNo": 1,
"lineType": "PLH",
"articleNo": "1400",
"articleName": "Brush",
"lineText": "Blue brush",
"quantityUnit": "grams",
"quantity": 100,
"volumeUnit": "",
"volume": 0,
"price": 2,
"itemGroup1": "400",
"itemGroup2": "",
"itemGroup3": "",
"currencyAmounts": {
"exclVat": 200,
"vat": 50,
"inclVat": 250
}
},
{
"lineNo": 2,
"lineType": "TXT",
"articleNo": "Text",
"articleName": "Text",
"lineText": "This is a text line"
}
]
}
]
}'{
"status": "NOT-PROCESSED",
"result": "PENDING",
"message": "Document batch accepted for processing",
"batchUuid": "8NlwdOIM1YLVFP9-WOwkYQ",
"getResult": "https://api.staging.amili.no/arm/v1/clients/2218/batches/8NlwdOIM1YLVFP9-WOwkYQ"
}