My Products
Help
KOVnet_Iryna
CONTRIBUTOR **

POST api/v1/customer Customer created with the wrong number

by KOVnet_Iryna

I have a question about POST request to https://integration.visma.net/API/controller/api/v1/customer

After creating a new Customer (Debtor) you do not send the created record back, the response is just empty.

In reality, it's very necessary to get the number of newly created Debtor back.

e.g. for the next call (adding the invoice to the newly created debtor) I need to know the number of Debtor.

Of course, I can suppose that the number of new Debtor is the one I sent in the field  "number": {
"value": "220001"} BUT after a simple test in POSTMAN I see that the number can differ: the 'customer' record was created, I did not get any error back, but the Debtor got a different number then I sent, probably because of the number range problem.
It may cause huge problems because during sending the invoices we will expect that Debtors were created with the number we sent.

Can you recommend something for this case?



 

2 REPLIES 2
Accepted solution
Yıldırım
VISMA

by Yıldırım

Hi, first, you need to figure out what is your ERP company Segment / Number series settings for the "Customer".

1) Segment keys(ScreenId=CS202000&DimensionID=CUSTOMER)

1-Segment keys.jpg
2) Number series (ScreenId=CS201010)

2-Number series.jpg

 

If auto-numbering enabled in the UI, but you'd like to override it via API, 
How to override Visma.net Financials ERP number-series (Automatic) via API

 

Then, regarding reading the number / ID of the recently created object, please see : 
How to read recently created object ID from Visma.Net API Response Headers ?

 

KOVnet_Iryna
CONTRIBUTOR **

by KOVnet_Iryna

here is a screenshot:
Screenshot 2023-05-26 at 14.41.45.png