Margarita G
CONTRIBUTOR **

Error "objetc reference not set to an instance of an objetc" using POST supplierInvoice

by Margarita G

Hello, 

 

We are having troubles sending a particular invoice to Visma through API using method: POST supplierInvoice

 

Previously we sent without any problem several invoices, but this particular invoices is returning error:   "object reference not set to an instance of an object".

 

MargaritaG_1-1633624781342.png

 

we are sending this json:

{
"documentType": {
"Value": "Invoice"
},
"referenceNumber": null,
"supplierNumber": {
"Value": "50164"
},
"supplierReference": {
"Value": "000006"
},
"paymentRefNo": {
"Value": ""
},
"currencyId": {
"Value": "NOK"
},
"postPeriod": {
"Value": "092021"
},
"description": {
"Value": "Adm. september"
},
"date": {
"Value": "2021-09-30"
},
"dueDate": {
"Value": "2021-10-14"
},
"note": {
},
"branchNumber": {
"Value": ""
},
"overrideNumberSeries": {
"Value": false
},
"invoiceLines": [
{
"subaccount": [
{
"segmentId": "1",
"segmentValue": "0"
}
],
"transactionDescription": {
"Value": "Adm. september"
},
"operation": "Insert",
"vatCodeId": {
"Value": "1"
},
"accountNumber": {
"Value": "6710"
},
"costInCurrency": {
"Value": "41250"
},
"branchNumber": null,
"deferralCode": null,
"projectId": null,
"projectTaskId": null
}
]
}
 
We appreciate your help.
 
Kind regards, 
 
Margarita G
1 REPLY 1
Accepted solution
Yıldırım
VISMA

by Yıldırım (Updated ‎08-10-2021 11:07 by Yıldırım VISMA )

Hello Margarita, 

 

we need some information and also need you to check certain steps in the Financials UI to be able to isolate the issue.

 

  1. Does the issue only occur with the specific "Supplier"  ?  Is there any instance where the same JSON work with the different references ? 

  2. Is the Financials company where you send the request using Manual / Auto Numbering ? Could you send a print screen from > ScreenId=CS202000
    segment.png

  3. Last but not least could you please try to create the Supplier Invoice in the Financials UI, with the same data sent via the API ? In this way we can see if there are any errors highlighted in the module.

Thanks.