php-alma-client icon indicating copy to clipboard operation
php-alma-client copied to clipboard

Ignore users without primary id

Open danmichaelo opened this issue 6 years ago • 1 comments

Today's surprise: The Alma users API can return users without any identifiers! 😲 Within the normal Alma GUI these are shown as "contacts".

Another weird thing is that the primary_id field is not something like null, but a not very machine-friendly string: "no primary id (123456789023)". Here's a full (anonymized) response example:

    {
      "primary_id": "no primary id (123456789023)",
      "first_name": "Hans",
      "last_name": "Jonas",
      "gender": {
        "value": "",
        "desc": ""
      },
      "status": {
        "value": "ACTIVE",
        "desc": "Active"
      },
      "requests": null,
      "loans": null,
      "fees": null,
      "link": "https://api-eu.hosted.exlibrisgroup.com/almaws/v1/users/-"
    }

Also notice that the link field is also not null, but an invalid URL that can not be dereferenced.

danmichaelo avatar Jun 18 '18 13:06 danmichaelo