Answered

/admins endpoint doesn't have 'job_title' field

  • 27 October 2020
  • 6 replies
  • 9 views

Badge +1

Hi there,

 

According to docs , GET /admins should return Admin Object which includes 'job_title' field.

But it doesn't.

 

Here are the corresponding requests:

 

1) /admins endpoint (no job_title)

```

GET https://api.intercom.io/admins/p>

 

 

{

"type": "admin.list",

"admins": [

{

"type": "admin",

"email": "admin@mail.com",

"id": "4325747",

"name": "Admin Admin",

"away_mode_enabled": false,

"away_mode_reassign": false,

"has_inbox_seat": true,

"team_ids": []

},

{

"type": "admin",

"email": "operator+ep13p0k7@intercom.io",

"id": "4427542",

"name": "Operator",

"away_mode_enabled": false,

"away_mode_reassign": false,

"has_inbox_seat": false,

"team_ids": []

}

]

}

```

 

2) /admin/id endpoint (job_title is present)

```

{

"type": "admin",

"id": "4325747",

"name": "Admin Admin",

"email": "admin@mail.com",

"away_mode_enabled": false,

"job_title": "job",

"away_mode_reassign": false,

"has_inbox_seat": true,

"team_ids": []

}

```

 

Thanks in advance

icon

Best answer by Eric Fitz 16 November 2020, 11:42

View original

6 replies

Userlevel 1
Badge

Hi @misha​ , I just now test it and it's working fine:

 

curl https://api.intercom.io/admins/b>id

=========================================

{

  "type": "admin",

  "id": "ID",

  "name": "Roy Sh.",

  "email": "admin@email.com",

  "away_mode_enabled": false,

  "job_title": "Magic Unicorn",

  "away_mode_reassign": false,

  "has_inbox_seat": true,

  "avatar": {

    "image_url": "avatarurl"

  },

  "team_ids": [Team1, Team2]

}

=========================================

Are you sure this admin entered the job title in the Intercom profile?

ProfileIDIf the job title is empty, API does not return this field:

nojobtitle 

Let me know if this helps.

Badge +1

Hi @roy s11​ 

Yeah, that's the problem. It works for /admins/id but doesn't work for /admins

Userlevel 1

Hey @misha​, checking with our team if this is expected behaviour or if you've stumbled on a bug!

Userlevel 1

Congrats on spotting a bug for us, @misha​! I've opened an issue for this now 👍

Userlevel 1

Hey @misha​, we've shipped a fix for this now, the job_title parameter will be returned for all admins on a call to the /admins endpoint!

Badge +1

Thanks, I verify that it's present in API

Reply