Hi Magnus I dont see how screenshots and screenId's are relevant here. We do not want to perform any actions in UI, we want to post the vouchers to Visma.NET through the API in a way that ensures the least amount of manual work in Visma.NET. Hence, we want to post it as "Open" in Visma.NET and not "Balanced" as we do now, and ideally we aim to auto-close the related vouchers in Visma.NET when we post it so our created invoice and the pre-existing invoice/payments (which comes out as sum 0) all gets "Avsluttet" / "Lukket" status in Kundeinformasjon Reskontro in Visma.NET without our customer having to manually set "Open" status, match and close the vouchers. So first thing to figure out is can we post an invoice through API to Visma.NET and set it with status "Open" instead of "Balanced" when we create the invoice voucher through the API? We use CustomerInvoiceV2 endpoint to post invoices data that we post: {
"invoiceLines": [
{
"operation": "Insert",
"description": {
"value": "Gebyrinntekt fra Kredin.no"
},
"quantity": {
"value": 1
},
"manualAmountInCurrency": {
"value": 3261
},
"accountNumber": {
"value": "3900"
}
},
{
"operation": "Insert",
"description": {
"value": "Renteinntekt fra Kredin.no"
},
"quantity": {
"value": 1
},
"manualAmountInCurrency": {
"value": 1356.51
},
"accountNumber": {
"value": "8050"
}
}
],
"sendToAutoInvoice": {
"value": false
},
"customerNumber": {
"value": "10001"
},
"documentDate": {
"value": "2021-05-01T00:00:00Z"
},
"invoiceText": {
"value": "Rente- og/eller gebyrinntekt fra saksnr. 21190 i Kredin.no"
}
} data, that was created in Visma.NET after posting and fetched from CustomerInvoice endpoint {
"creditTerms": {
"id": "14",
"description": "14 dager netto"
},
"documentDueDate": "2021-05-15T00:00:00",
"cashDiscountDate": "2021-05-01T00:00:00",
"exchangeRate": 1,
"attachments": [],
"taxDetails": [
{
"taxId": "3",
"vatRate": 25,
"taxableAmount": 4617.51,
"vatAmount": 1154.38
}
],
"invoiceLines": [
{
"lineNumber": 1,
"description": "Gebyrinntekt fra Kredin.no",
"quantity": 1,
"unitPrice": 0,
"unitPriceInCurrency": 0,
"manualAmount": 3261,
"manualAmountInCurrency": 3261,
"amount": 3261,
"amountInCurrency": 3261,
"account": {
"type": "Income",
"number": "3900",
"description": "Andre driftsrel. inntekter avg.pliktig"
},
"vatCode": {
"id": "3",
"description": "Utgående mva, høy sats"
},
"discountPercent": 0,
"discountAmount": 0,
"discountAmountInCurrency": 0,
"manualDiscount": false,
"subaccount": {
"subaccountNumber": "0",
"subaccountId": 1083,
"description": "Ingen",
"lastModifiedDateTime": "2019-04-10T12:27:20.48",
"active": true,
"segments": [
{
"segmentId": 1,
"segmentDescription": "Avdeling",
"segmentValue": "0",
"segmentValueDescription": "None"
}
]
},
"deferralSchedule": 0,
"branchNumber": {
"number": "1",
"name": "Firmanavn AS"
}
},
{
"lineNumber": 2,
"description": "Renteinntekt fra Kredin.no",
"quantity": 1,
"unitPrice": 0,
"unitPriceInCurrency": 0,
"manualAmount": 1356.51,
"manualAmountInCurrency": 1356.51,
"amount": 1356.51,
"amountInCurrency": 1356.51,
"account": {
"type": "Income",
"number": "8050",
"description": "Annen renteinntekt"
},
"vatCode": {
"id": "3",
"description": "Utgående mva, høy sats"
},
"discountPercent": 0,
"discountAmount": 0,
"discountAmountInCurrency": 0,
"manualDiscount": false,
"subaccount": {
"subaccountNumber": "0",
"subaccountId": 1083,
"description": "Ingen",
"lastModifiedDateTime": "2019-04-10T12:27:20.48",
"active": true,
"segments": [
{
"segmentId": 1,
"segmentDescription": "Avdeling",
"segmentValue": "0",
"segmentValueDescription": "None"
}
]
},
"deferralSchedule": 0,
"branchNumber": {
"number": "1",
"name": "Firmanavn AS"
}
}
],
"sendToAutoInvoice": false,
"roundingDiff": 0,
"customerVatZone": {
"id": "01",
"description": "Salg innenlands, avgiftspliktig"
},
"hold": false,
"discountTotal": 0,
"discountTotalInCurrency": 0,
"detailTotal": 4617.51,
"detailTotalInCurrency": 4617.51,
"vatTaxableTotal": 4617.51,
"vatTaxableTotalInCurrency": 4617.51,
"vatExemptTotal": 0,
"vatExemptTotalInCurrency": 0,
"paymentReference": "100010000592",
"dontPrint": true,
"dontEmail": false,
"customer": {
"number": "10001",
"name": "Regnskaps Companiet AS"
},
"documentType": "Invoice",
"referenceNumber": "000059",
"postPeriod": "052021",
"financialPeriod": "202105",
"documentDate": "2021-05-01T00:00:00",
"origInvoiceDate": "2021-05-01T00:00:00",
"status": "Balanced",
"currencyId": "NOK",
"amount": 5771.89,
"amountInCurrency": 5771.89,
"balance": 5771.89,
"balanceInCurrency": 5771.89,
"cashDiscount": 0,
"cashDiscountInCurrency": 0,
"paymentMethod": {
"id": "1",
"description": "Innlandsbetalinger"
},
"invoiceText": "Rente- og/eller gebyrinntekt fra saksnr. 21190 i Kredin.no",
"lastModifiedDateTime": "2022-02-08T15:52:45.043",
"createdDateTime": "2022-02-08T15:52:45.043",
"note": "",
"vatTotal": 1154.38,
"vatTotalInCurrency": 1154.38,
"location": {
"countryId": "NO",
"id": "Main",
"name": "Primary location"
},
"branchNumber": {
"number": "1",
"name": "Firmanavn AS"
},
"cashAccount": "1910",
"project": {
"id": "X",
"description": "Non-Project Code."
},
"account": {
"type": "Asset",
"number": "1500",
"description": "Kundefordringer"
},
"subaccount": {
"subaccountNumber": "0",
"subaccountId": 1083,
"description": "Ingen",
"lastModifiedDateTime": "2019-04-10T12:27:20.48",
"active": true,
"segments": [
{
"segmentId": 1,
"segmentDescription": "Avdeling",
"segmentValue": "0",
"segmentValueDescription": "None"
}
]
},
"metadata": {
"totalCount": 3,
"maxPageSize": 1000
}
} status field of newly created invoice "status": "Balanced", How it looks in Visma.NET after creation https://ibb.co/2YHhZbS Looking forward to your reply
... View more