Glue API pagination offset bug


Hi there,

we’re currently experiencing a bug with the API pagination.

It uses a limit and an offset parameter to

  • define the max. number of returned records
  • define the skipped number of records

This is also what the links for a paginated resource imply:
“links”: {
“self”: “[limit]=3&page[offset]=1”,
“last”: “[offset]=12&page[limit]=3”,
“first”: “[offset]=0&page[limit]=3”,
“prev”: “[offset]=0&page[limit]=3”,
“next”: “[offset]=4&page[limit]=3

At least for the /orders endpoint, pagination does not work as expected.
The offset value is actually used as a page number.
Because of that, page[limit]=3&page[offset]=1 actually skips 3 entries, not 1.

I’ve collected some more information on this bug.
Problem is, that the sales module uses propel’s pagination feature to return the requested orders.
This feature does support an offset, but works with actual pages.

\Spryker\Glue\OrdersRestApi\Processor\Order\OrderReader::getOrderListAttributes simply sets the given offset value as the page number.

Can you please check this bug?


Hi Felix,

Thank you for the report. I’ve created an internal ticket for this. I’ll notify here about further updates.

Best regards,