My Products
Help
Florian Haase
PARTNER

discount endpoint not following the standard for pagination (yet?)

by Florian Haase

Hi,

 

are there any plans for a new version of the discount endpoint with the pagination info like in all the other endpoints? 

 

now it returns:

 

{
"pageNumber": 0,
"pageSize": 0,
"totalCount": 0,
"records": [
{
"discountCode": "string",
"series": "string",

...

 

and I have to handle this in our standard-accessor in another way as all the other endpoints which have this information in the meta-data (?)

 

Same problem in the SalesPerson endpoint.

Florian

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

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

Hello Florian, 

 

SalesPerson endpoint pagination meta-data format has been fixed, and it is currently in the release planning phase.

 

DiscountCode also represents wrong DTO format for pagenumber and pagesize. They both DiscountCode & Discount Endpoints have been registered in our backlog as a bug. 

 

We'll emphasize this once again to get this aligned with the rest of the APIs as regular Pagination enforcement data represented in the DTO with max pagesize is wrapped in MetaData{ }

 

 

Florian Haase
PARTNER

by Florian Haase

Just a question: You write that Salesperson is fixed. I hope that it is fixed in a way that does not break the backward compatibility?

Not sure that we have resources here to change our implementation just in the moment when you release it in production...

 

Yıldırım
VISMA

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

It has not been released yet, information will be published at the "News" in advance once the release details have been finalized.

 

It'll be wrapped as the base metadata{}. 

Base_pagination_data.png

Florian Haase
PARTNER

by Florian Haase

Hmm, is this the answer on my question?

From your screenshot I see, that the structure with the ..records:[] will disappear. That will break the compatibility if you not implement this as a new API-Endpoint. (feks V2)

Yıldırım
VISMA

by Yıldırım (Updated ‎05-10-2021 14:36 by Yıldırım VISMA )

We've informed the development team about your question, to check differences apart from wrapping the pagination with Metadata{}, but currently there is no plan to introduce V2 Endpoints  for the metadata{} correction on SalesPerson / Discount / DiscountCode. 


Florian Haase
PARTNER

by Florian Haase

Instead of introducing this with a breaking change, its actually better to leave it as it is. Especially on discount we have som webshop integrations which have to be up and running 24/7 - we can't risk there that the integrations are stopping and we have no stage environment from Visma. Therefore we cannot change and test our code first.

Yıldırım
VISMA

by Yıldırım

Hello, 


we've confirmed that the fix will be implemented as SalesPerson V2 Endpoint.  The rest (Discount / DiscountCode) will also be assessed in this way.