Get effective breaks (v2) Documentation
Get effective breaks (v2)
Get effective breaks (v2)
Get effective breaks (v2)
Break statuses agents can use, optionally for one agent
Overview
Available Endpoints
/api/v2/effective-breaksKey Parameters
agent-id(Integer)The agent's ID (the id returned by GET /api/v2/agents). When sent, breaks an admin has hidden for this agent come back with "disabled": true. Leave it out, or send it empty, to get the service list with no agent-specific flags. The agent must be active and belong to the token's service.
Usage Scenarios
Breaks for the whole service
No parameters. Use this when you don't have a specific agent in mind, for example to show break names in a report. Response shortened; a typical service has around a dozen breaks.
Breaks for one agent
Pass agent-id. Here an admin has hidden Leave for agent 319, so it comes back with "disabled": true. The break is still in the list so you can show its name and colour; just don't let the agent pick it.
Quick Example
Try this API with a simple cURL command
curl 'https://telephonycloud.co.in/api/v2/effective-breaks' \
-H 'Authorization: Bearer <YOUR_TOKEN>'Response Preview
Sample response from this API
[{"break_id":0,"label":"Available","icon":"available","color":"#5ccc56","is_system":true,"sort_order":1,"is_deleted":false,"category":"SYSTEM"},{"break_id":1,"label":"Meal","icon":"lunch","color":"#F4...