My Products
Help
Anders Liljefors
CONTRIBUTOR *

NumberSequence strange behavior, lastNbr

by Anders Liljefors

 

We are using this enpoint to get lastNbr but i gives wrong info
The last assigned number is incorrect

https://integration.visma.net/API/controller/api/v1/numberSequence/BATCH

same problem with APBILL

 

Something changed in the API that I missed?

 

 

 

AndersLiljefors_0-1648026658990.png

 

AndersLiljefors_1-1648026700994.png

 

 

11 REPLIES 11

by Magnus Johnsen

Hi,

The "last assigned number" seems to refer to the highest number that has been used in the series.

As far as we can see there has not been a change in the latest update, has it reacted differently for you before? 

Anders Liljefors
CONTRIBUTOR *

by Anders Liljefors

Hi,


Yes, it has always worked fine for several years, looks like it started around lunchtime yesterday

We currently have about 180 companies affected by this problem and we have not made any changes to our side.

 

/anders

by Magnus Johnsen

We're looking in to this at the moment, is there a special use case you have for it?

Anders Liljefors
CONTRIBUTOR *

by Anders Liljefors

We are using 

https://integration.visma.net/API/controller/api/v1/numberSequence/APBILL

To get lastNbr and we are using the result + 1  as referenceNumber on the supplier Invoice booking, booking works but the Invoice gets another referenceNumber.

 

/anders 

by Magnus Johnsen

In your screenshot it looks like you are not using manual numbering, so you should be able to just remove that part of the code without any difference in how it sounds like you want it to work.

 

Anders Liljefors
CONTRIBUTOR *

by Anders Liljefors

Hi,

We can't o that, we need to know what referenceNumber we got on the booking.
Since we just get an empty response on successful booking we need to fetch
the booking we just made and verify the result.  We can't do that if we don't now
the referenceNumber.

 

/anders

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

The number set is returned in the location header, you can read more about it here:

How to read recently created object ID from Visma.Net API Response Headers in C# ?

So if you're doing any other processing after posting the document, we generally recommend using the response header to identify the document number.

Anders Liljefors
CONTRIBUTOR *

by Anders Liljefors

Hi,

 

We have missed that functionality, I will look at it immediately

 

/anders

Anders Liljefors
CONTRIBUTOR *

Hi,

Do you continue to look on your side at what may have happened?
Even if we manage to make the changes on our side, we have a large number of customers who have problems and who were affected yesterday without us making any change.

 

/anders

by Magnus Johnsen

Hi,

It seems like the function of this was changed in the UI but not yet in the API.

We are discussing this with the developers.

Thank you. 

Anders Liljefors
CONTRIBUTOR *

by Anders Liljefors

Hi,

 

We rewrote our integration last night according to your recommendation and have now updated the integration for all our customers, it seems to be working fine.

But we have a large number of cases to solve with our customers regarding bookings that were made until we got our new solution in place.

 

/anders