How to query a particular agent

You can query a particular agent using the source (like Zendesk) and the id (agent ID in Zendesk). Here is an script that does that:

ACCESS_ID='yourlongbabelforceapiaccessidgoeshere'
TOKEN='yourlongbabelforceapitokengoeshere'

ENDPOINT="https://services.babelforce.com/api/v2/agents/423234586?agentSource=zendesk"

echo "query a particular with Zendesk agent ID and source=Zendesk"

curl $ENDPOINT \
-H "X-Auth-Access-Id: $ACCESS_ID" \
-H "X-Auth-Access-Token: $TOKEN" \

 

Running the above on the command line will give the following output:

query a particular with Zendesk agent ID and source=Zendesk

{

  "data" : {

    "success" : true,

    "agent" : {

      "id" : 138,

      "state" : "available",

      "sourceId" : "423234586",

      "agentSource" : "zendesk",

      "name" : "John Smith",

      "priority" : 0,

      "number" : "+3438424729",

      "enabled" : true,

      "dateCreated" : "2014-10-02T16:34:59.000Z",

      "lastUpdated" : "2014-11-12T23:11:13.000Z",

      "email" : "name@company.com",

      "numbers" : [ {

        "number" : "+443308123485",

        "landing" : true,

        "display" : true

      } ]

    }

  }

 

Have more questions? Submit a request