Skip to content

Get Last Opened Customer

Returns the customer that the linked user last opened.

Request

GET /api/oauth/v2/resource/customers/last-opened

HeaderValue
AuthorizationBearer {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

FieldTypeDescription
data.idstring (UUID)Unique customer ID
data.titlestring | nullTitle (e.g. Dr., Mag.)
data.firstNamestring | nullFirst name
data.lastNamestring | nullLast name
data.emailstring | nullEmail address
data.phonestring | nullFull primary number: country code + national number, concatenated in 00-format (e.g. 00436641234567)
data.telstring | nullNational primary number without country code (e.g. 6641234567)
data.telCodestring | nullCountry dialing code of the primary number in 00-format (e.g. 0043)
data.phoneSecondarystring | nullFull secondary number: country code + number, concatenated in 00-format
data.telSecondarystring | nullNational secondary number without country code
data.telCodeSecondarystring | nullCountry dialing code of the secondary number in 00-format
data.birthdaystring | nullDate of birth (YYYY-MM-DD)
data.socialNumberstring | nullSocial security number
data.tenanciesArrayAssigned tenants
data.tenancies[].idstring (UUID)Tenant ID
data.tenancies[].namestringName of the tenant
data.tenancies[].abbreviationstringAbbreviation
data.tenancies[].colorstringColor 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

StatusCodeDescription
401invalid_clientInvalid or missing access token
403insufficient_scopeScope customers not present
404not_foundNo user linked to the OAuth client, or no customer opened yet

Offisy GmbH