List Customers
Returns a paginated list of all customers of the company.
Request
GET /api/oauth/v2/resource/customers
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
offset | integer | No | Start position (default: 0) |
limit | integer | No | Number of results (default: 50, max: 200) |
term | string | No | Search term for name (min. 3 characters) |
socialNumber | string | No | Social security number (exact match) |
email | string | No | Email address (exact match) |
phone | string | No | Phone number (exact match) |
Note: All search filters can be combined (AND logic). For example, you can filter by
socialNumberandtermat the same time.
Response
Success (200 OK)
json
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": null,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna.muster@example.com",
"phone": "+43 664 1234567",
"birthday": "1985-04-12",
"socialNumber": "1234 120485",
"tenancies": [
{
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"name": "Ordination Muster",
"abbreviation": "OM",
"color": "#00adba"
}
]
}
],
"meta": {
"total": 1200,
"offset": 0,
"limit": 50
}
}Response fields
| Field | Type | Description |
|---|---|---|
data | Array | List of customers |
data[].id | string (UUID) | Unique customer ID |
data[].title | string | null | Title (e.g. Dr., Mag.) |
data[].firstName | string | null | First name |
data[].lastName | string | null | Last name |
data[].email | string | null | Email address |
data[].phone | string | null | Phone number |
data[].birthday | string | null | Date of birth (YYYY-MM-DD) |
data[].socialNumber | string | null | Social security number |
data[].tenancies | Array | Assigned tenants |
data[].tenancies[].id | string (UUID) | Tenant ID |
data[].tenancies[].name | string | Name of the tenant |
data[].tenancies[].abbreviation | string | Abbreviation |
data[].tenancies[].color | string | Color as hex code |
meta.total | integer | Total number of customers |
meta.offset | integer | Current start position |
meta.limit | integer | Number of returned entries |
Beispiele
bash
curl -X GET "https://my.offisy.at/api/oauth/v2/resource/customers?offset=0&limit=50&term=Muster&socialNumber=1234010190&email=anna.muster%40example.com&phone=%2B43+664+1234567" \
-H "Authorization: Bearer {access_token}"Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope customers not present |