1. U4 ERPx
  2. API Reference
  3. ObjectAPI
  4. Limit and offset

Limit and offset

Request subset of Enterprise Documents (paging scenarios)

The limit and offset query parameters allow you to implement pagination by requesting subsets of Enterprise Documents.

Parameters

  • limit: Specifies the maximum number of Enterprise Documents to return in a single request.
  • offset: Specifies the number of Enterprise Documents to skip from the beginning of the result set.

Usage example

curl -X GET \
  "https://unit4-api-address/v1/objects/customers\
        ?companyId=EN\
        &limit=50\
        &offset=100" \
    -H "Authorization: Bearer YOUR_TOKEN_HERE" \
    -H "Accept-Encoding: gzip"

This request will return up-to 50 customers, starting from the 101st customer in the result set.

Pagination pattern

To implement pagination:

  1. Start with offset=0 for the first page.
  2. For subsequent pages, increment offset by the value of limit.
  3. Continue until fewer documents than limit are returned.

For more advanced pagination strategies, see Working with Large Volumes.