List Users
GET /api/users
Section titled “GET /api/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.
Headers
Section titled “Headers”| Header | Required | Value |
|---|---|---|
api-key | yes | Import API key |
Query parameters
Section titled “Query parameters”All parameters are optional.
| Parameter | Type | Description |
|---|---|---|
partner_name | string | Filter by partner name (exact match). Only users linked to the given partner return. |
agency_id | string | Filter by agency ID (exact match). |
uber_id | string | Filter by Uber ID (exact match). |
email | string | Filter by email address (exact match). |
id | int | Filter by internal user ID (exact match). |
limit | int | Results per page. Min: 1, max: 200. Default: 200 |
page | int | Page number. Default: 1 |
existing_product_id | int | Only return users who already have the full required quantity of this product (i.e. it’s in their existing_kit). |
available_product_id | int | Only return users who are missing quantity of this product (i.e. it’s in their available_kit). |
existing_kit_empty | bool | 1/true returns users whose existing_kit is empty; 0/false returns users whose existing_kit has at least one entry. |
available_kit_empty | bool | 1/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_kitwhen owned ≥ required. - An entry belongs to
available_kitwhen owned < required (still owed to the user).
Example request
Section titled “Example request”GET /api/users?partner_name=Randstad&limit=50&page=2api-key: <key>Response
Section titled “Response”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}Response field reference
Section titled “Response field reference”The top-level object is a standard Laravel paginator. The most relevant fields:
| Field | Type | Description |
|---|---|---|
data | array | The users on the current page |
current_page | int | Current page number |
last_page | int | Last available page number |
per_page | int | Results per page (mirrors limit) |
total | int | Total number of matching users across all pages |
Each entry in data:
| Field | Type | Description |
|---|---|---|
id | int | Internal user ID |
uber_id | string | The user’s Uber ID |
agency_id | string | null | The user’s agency identifier, or null |
email | string | User email address |
partner_name | string | null | Name of the partner the user belongs to, or null |
kit | array | Full product kit assigned to the user (see below) |
existing_kit | array | Subset of kit the user already has in full (owned ≥ required) |
available_kit | array | Subset of kit the user is still missing (owned < required) |
Each entry in kit, existing_kit, and available_kit:
| Field | Type | Description |
|---|---|---|
user_id | int | User ID |
product_id | int | Product ID |
quantity | int | Required quantity for this user |
mandatory | bool | Whether this product is mandatory |
product | object | Product snapshot (id and product_name) |
channel | string | null | Only 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. |
HTTP error codes
Section titled “HTTP error codes”| Status | Description |
|---|---|
401 | Missing api-key header |
403 | Invalid api-key value |