My Products
Help
gordana_jlmwms
PARTNER

POST customerInvoice ERROR: Operation parameter: value 0 - 0 is not valid for this type of request.

by gordana_jlmwms

Invoice object

 

{
"currencyId":{"value":"SEK"},
"customerRefNumber":{"value":"Stefan Sundström"},
"externalReference":{"value":"Fredrik Janrud"},
"invoiceLines":[
{
"description":{"value":"???"},
"quantity":{"value":1.0},
"unitPriceInCurrency":{"value":1534200.0},
"accountNumber":{"value":"3031"},
"subaccount":[
{"segmentId":1,"segmentValue":"00"},
{"segmentId":2,"segmentValue":"0000001"},
{"segmentId":3,"segmentValue":"00000000001"},
{"segmentId":4,"segmentValue":"000"}
]
}],
"customerNumber":{"value":"49999"},
"documentDate":{"value":"2023-10-16T00:00:00"},
"financialPeriod":{"value":"202310"},
"invoiceText":{"value":"Detta är en testkommentar"},
"branchNumber":{"value":"1"}
}

 

 

what's wrong?

7 REPLIES 7

by Magnus Johnsen

Hi,

You are missing the operation on the invoiceLine:

 "operation": "Insert",

 

Please include it in your payload and try again.

Thank you. 

gordana_jlmwms
PARTNER

Ok, thank you.

 

Now is another ERROR,  but segments exist with this ID and value I pass with the object.

{  "message": "VismaId: 47d95459-d0e5-47c9-a871-7efe35050131. Error creating document. Error: Uppdrag/ÄTA of SubID do not exist."
}

 

object

gordana_jlmwms_0-1700056680537.png

 

gordana_jlmwms_1-1700056957573.png

 

 

gordana_jlmwms
PARTNER

I notices that accounting details get errors if I want to create a new customer invoice in visma. Uppdarg/ÄTA subaccount should be 11 characters in length. Could this be the cause of the error I'm getting?

 

gordana_jlmwms_0-1700125437427.png

 

by Magnus Johnsen (Updated ‎16-11-2023 14:57 by Magnus Johnsen VISMA )

Please have a look at this article:

“xxx” of SubAccount can’t be found

gordana_jlmwms
PARTNER

If you look at the object what I want to send is (see image from 15.04 time). Subaccount is on Visma. Error comes in response. Error comes in response if I don't send subaccount.

gordana_jlmwms_0-1700141912144.png

 

I think there is something wrong with Visma company. I have no problem importing the same data to another Visma company.

gordana_jlmwms
PARTNER

Can't open link

Accepted solution
Magnus Johnsen
VISMA