Get Last Opened Customer
Returns the customer that the linked user last opened.
Request
GET /api/oauth/v2/resource/customers/last-opened
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Response
Success (200 OK)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": null,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna.muster@example.com",
"phone": "00436641234567",
"tel": "6641234567",
"telCode": "0043",
"phoneSecondary": "00436649876543",
"telSecondary": "6649876543",
"telCodeSecondary": "0043",
"birthday": "1985-04-12",
"socialNumber": "1234 120485",
"tenancies": [
{
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"name": "Ordination Muster",
"abbreviation": "OM",
"color": "#00adba"
}
]
}
}Response fields
| Field | Type | Description |
|---|---|---|
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 | Full primary number: country code + national number, concatenated in 00-format (e.g. 00436641234567) |
data.tel | string | null | National primary number without country code (e.g. 6641234567) |
data.telCode | string | null | Country dialing code of the primary number in 00-format (e.g. 0043) |
data.phoneSecondary | string | null | Full secondary number: country code + number, concatenated in 00-format |
data.telSecondary | string | null | National secondary number without country code |
data.telCodeSecondary | string | null | Country dialing code of the secondary number in 00-format |
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 |
Beispiele
bash
curl -X GET "https://my.offisy.at/api/oauth/v2/resource/customers/last-opened" \
-H "Authorization: Bearer {access_token}"Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope customers not present |
| 404 | not_found | No user linked to the OAuth client, or no customer opened yet |