Users API
Note
The API data from the Users section can be accessed only by Administrators. .
Customer groups
View a customer group
GET /group/{id}
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/group/1 \
-H 'apikey: dWIeGMRlikMIle'
Response:
{
"id": 1,
"name": "VIP",
"description": "VIP Customers"
}
List all Customer groups
GET /groups
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/groups \
-H 'apikey: dWIeGMRlikMIle'
Response:
[
{
"id": 1,
"name": "VIP",
"description": "VIP Customers"
},
{
"id": 2,
"name": "Works Ltd.",
"description": "Works Ltd. company customers"
},
{
"id": 3,
"name": "ProConsulting",
"description": "ProConsulting customers"
}
]
Customers
View a Customer
GET /customer/{id}
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/customer/1 \
-H 'apikey: dWIeGMRlikMIle'
Response:
{
"id": 1,
"name": "Sample User",
"email": "sampleuser@example.com",
"notifications": true,
"login": "sampleuser",
"active": true,
"role": "Customer",
"group": "VIP",
"company": "ACME Company",
"url": "http:\/\/www.example.com\/",
"country": "US",
"region": "California",
"address": "South Street 4412",
"zip": "7140",
"phone": "+20124184990",
"external_id": "99877718"
}
List all Customers
GET /customers/{group}/{role}
Filters
Name | Type | Description |
---|---|---|
{group} | Integer | Customer group ID |
{role} | Integer | Customer role: - C - Customer - M - Customer Manager - any - All roles |
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/customers/10/any \
-H 'apikey: dWIeGMRlikMIle'
Response:
[
{
"id": 1,
"name": "Sample User",
"email": "sampleuser@example.com",
"notifications": true,
"login": "sampleuser",
"active": true,
"role": "Customer",
"group": "VIP",
"company": "ACME Company",
"url": "http:\/\/www.example.com\/",
"country": "US",
"region": "California",
"address": "South Street 4412",
"zip": "7140",
"phone": "+20124184990",
"external_id": "99877718"
},
{
"id": 2,
"name": "John Doe",
"email": "jdoe@example.com",
"notifications": true,
"login": "jdoe",
"active": true,
"role": "Customer",
"group": "VIP",
"company": "ACME Company",
"url": "http:\/\/www.example.com\/",
"country": "US",
"region": "California",
"address": "South Street 4412",
"zip": "7140",
"phone": "+20124184990",
"external_id": "99877718"
}
]
Agents
View an Agent
GET /agent/{id}/{permissions}
Name | Type | Description |
---|---|---|
{id} | Integer | Agent ID |
{permissions} | Integer | Show queue permissions: - 1 - yes - 0 - no |
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/agent/10/1 \
-H 'apikey: dWIeGMRlikMIle'
Response:
{
"id": 10,
"name": "Daniel Morales",
"email": "dmorales@acme.com",
"notifications_enabled": true,
"login": "dmorales@acme.com",
"administrator": true,
"active": true,
"signature":"-----------------------------\r\nDaniel Morales\r\nHelp Desk Manager",
"permissions": [
{
"queue": 1,
"role": "Queue Manager"
},
{
"queue": 2,
"role": "Agent"
},
{
"queue": 3,
"role": "Queue Manager"
},
{
"queue": 4,
"role": "Agent"
}
]
}
List all Agents
GET /agents/{permissions}
Parameters
Name | Type | Description |
---|---|---|
{permissions} | Integer | Show queue permissions: - 1 - yes - 0 - no |
Sample code:
curl -X GET \
https://acme.sympoq.com/app/desk/api/agents/0 \
-H 'apikey: dWIeGMRlikMIle'
Response:
[
{
"id": 10,
"name": "Daniel Morales",
"email": "dmorales@acme.com",
"notifications_enabled": true,
"login": "dmorales@acme.com",
"administrator": true,
"active": true,
"signature":"-----------------------------\r\nDaniel Morales\r\nHelp Desk Manager"
},
{
"id": 11,
"name": "Lilly Bertineau",
"email": "lbertineau@acme.com",
"notifications_enabled": true,
"login": "lbertineau@acme.com",
"administrator": false,
"active": true,
"signature":"-----------------------------\r\nLilly Bertineau\r\nSupport Agent"
},
{
"id": 12,
"name": "Alain Tresor",
"email": "atresor@acme.com",
"notifications_enabled": true,
"login": "atresor@acme.com",
"administrator": false,
"active": true,
"signature":"-----------------------------\r\nAlain Tresor\r\nSupport Agent"
},
]