Skip to content

List Users

Returns a paginated list of users that have an uber_id and/or an agency_id set, including the product kit assigned to each user. Useful for syncing the set of riders known to the eShop. Users with neither field set are never returned.

HeaderRequiredValue
api-keyyesImport API key

All parameters are optional.

ParameterTypeDescription
partner_namestringFilter by partner name (exact match). Only users linked to the given partner return.
agency_idstringFilter by agency ID (exact match).
uber_idstringFilter by Uber ID (exact match).
emailstringFilter by email address (exact match).
idintFilter by internal user ID (exact match).
limitintResults per page. Min: 1, max: 200. Default: 200
pageintPage number. Default: 1
existing_product_idintOnly return users who already have the full required quantity of this product (i.e. it’s in their existing_kit).
available_product_idintOnly return users who are missing quantity of this product (i.e. it’s in their available_kit).
existing_kit_emptybool1/true returns users whose existing_kit is empty; 0/false returns users whose existing_kit has at least one entry.
available_kit_emptybool1/true returns users whose available_kit is empty; 0/false returns users whose available_kit has at least one entry.

existing_kit and available_kit are computed by comparing each kit entry’s required quantity against how many of that product the user has actually been assigned (UserProduct rows with assigned_at set):

  • An entry belongs to existing_kit when owned ≥ required.
  • An entry belongs to available_kit when owned < required (still owed to the user).
GET /api/users?partner_name=Randstad&limit=50&page=2
api-key: <key>

HTTP 200 OK

{
"current_page": 2,
"data": [
{
"id": 71,
"uber_id": "abc123",
"agency_id": "P-12345",
"email": "john.doe@example.com",
"partner_name": "Randstad",
"kit": [
{
"user_id": 71,
"product_id": 7,
"quantity": 2,
"mandatory": true,
"product": {
"id": 7,
"product_name": "Rain Jacket"
}
}
],
"existing_kit": [
{
"user_id": 71,
"product_id": 7,
"quantity": 2,
"mandatory": true,
"product": {
"id": 7,
"product_name": "Rain Jacket"
},
"channel": "app"
}
],
"available_kit": []
}
],
"first_page_url": "https://.../api/users?page=1",
"from": 51,
"last_page": 5,
"last_page_url": "https://.../api/users?page=5",
"next_page_url": "https://.../api/users?page=3",
"path": "https://.../api/users",
"per_page": 50,
"prev_page_url": "https://.../api/users?page=1",
"to": 100,
"total": 240
}

The top-level object is a standard Laravel paginator. The most relevant fields:

FieldTypeDescription
dataarrayThe users on the current page
current_pageintCurrent page number
last_pageintLast available page number
per_pageintResults per page (mirrors limit)
totalintTotal number of matching users across all pages

Each entry in data:

FieldTypeDescription
idintInternal user ID
uber_idstringThe user’s Uber ID
agency_idstring | nullThe user’s agency identifier, or null
emailstringUser email address
partner_namestring | nullName of the partner the user belongs to, or null
kitarrayFull product kit assigned to the user (see below)
existing_kitarraySubset of kit the user already has in full (owned ≥ required)
available_kitarraySubset of kit the user is still missing (owned < required)

Each entry in kit, existing_kit, and available_kit:

FieldTypeDescription
user_idintUser ID
product_idintProduct ID
quantityintRequired quantity for this user
mandatoryboolWhether this product is mandatory
productobjectProduct snapshot (id and product_name)
channelstring | nullOnly present on existing_kit entries. How the product was assigned: app (assigned by partner/admin staff via the rider app), eshop (self-checkout on the public eshop), or oms (imported from the external order management system). null if it can’t be determined. Not present on kit or available_kit entries, since those aren’t backed by an actual assignment yet.
StatusDescription
401Missing api-key header
403Invalid api-key value