GET /v1/departments/distribution-rules
GET
/v1/departments/distribution-rules
const url = 'https://seu-endereco-da-api/v1/departments/distribution-rules';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://seu-endereco-da-api/v1/departments/distribution-rules \ --header 'Authorization: Bearer <token>'Permissão que a Chave de acesso precisa: Gerenciar departamentos (departments:manage).
Authorizations
Seção intitulada “Authorizations”Responses
Seção intitulada “Responses”Media typeapplication/json
Array<object>
object
id
required
string
position
required
The first rule, in this order, whose filter matches the contact decides where the ticket opens
number
filter
required
Contact filter in the same dialect as the contact list
object
key
additional properties
any
conditions
required
How the screen drew the filter, kept so it can be redrawn
object
key
additional properties
any
departmentId
required
Null when the rule sends the ticket to the user in ownerFieldKey
string
ownerFieldKey
required
Key of a contact field of type USER: the ticket goes to that user, or to his first department while he is offline or at his conversation limit
string
Example generated
[ { "id": "example", "position": 1, "filter": {}, "conditions": {}, "departmentId": "example", "ownerFieldKey": "example" }]