- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hi,
I'm posting invoices to a particular period (first open one) but the api seems to react differently depending on the user.
When I send his dto, it posts correctly, but when the user tries the same dto on a prod database they get an error:
"Error: HTTP 400 : BadRequest\r\n{\"message\":\"Error creating supplierInvoice. Error: An error in processing of field Post period value 20-2413 General ledger error: The financial period is not found in the system."
We didn't feed it 20-2413 but 202413 like you can see below. It seems the api adds a - and then confuses itself? We got that period from the period column from v1/financialperiod..
Thing is, on another test database it worked fine for me, is this a server setting maybe?
DTO:
POST https://integration.visma.net/API/controller/api/v1/supplierinvoice
{
"documentType": {
"value": "Invoice"
},
"hold": {
"value": false
},
"date": {
"value": "2024-10-29T00:00:00Z"
},
"origInvoiceDate": {
"value": "2024-10-29T00:00:00Z"
},
"postPeriod": {
"value": "202413"
},
"supplierReference": {
"value": "***"
},
"description": {
"value": "***"
},
"supplierNumber": {
"value": "30805"
},
"currencyId": {
"value": "USD"
},
"branchNumber": {
"value": "BBBB"
},
"supplierTaxZone": {
"value": "IMPEXP"
},
"taxCalculationMode": {
"value": "Gross"
},
"paymentMethod": {
"value": "8"
},
"cashAccount": {
"value": "20080"
},
"invoiceLines": [
{
"operation": "Insert",
"transactionDescription": {
"value": "Chat GPT"
},
"costInCurrency": {
"value": 20
},
"accountNumber": {
"value": "47300"
},
"vatCodeId": {
"value": 99
},
"branch": {
"value": "BBBB"
}
}
]
}
Solved! Go to Solution.
Thx for the update Gert-Jan!
Never mind see that the format should be MMYYYY in te docs, not sure why this did work in other db. Tried to delete question but that option is missing.
