Skip to content

Click2CallGetDialRules

GET click2call/dialRules/list

Returns the dial rules of the brand. For the rules a specific manager can actually use, see Click2CallGetMyProfiles — it returns them already grouped by profile.

Access Control

Allowed role: admin, within the brand of the caller.

Request

GET request
GET https://{broker_domain}/click2call/dialRules/list?limit=50&where=%5B%5B%22profileId%22%2C%22%3D%22%2C3%5D%5D
Authorization: <JWT_TOKEN>
{
  "command": "Click2CallGetDialRules",
  "extID": "1",
  "data": {
    "limit": 50,
    "where": [
      [
        "profileId",
        "=",
        3
      ]
    ]
  }
}
const res = await platform.Click2CallGetDialRules({
  limit: 50,
  where: [
    [
      "profileId",
      "=",
      3
    ]
  ]
});

Request Data

Field Type Required Description
limit int No Page size, 1..100, default 20
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
count array No Row count aggregate, ["id"]
where array No Conditions [field, operator, value], for example [["status", "=", "ENABLED"]]; other filter keys and the field rules are in List queries

Response Data

{
  "rows": [
    {
      "id": 7,
      "brand": "default",
      "profileId": 3,
      "countryCode": "380",
      "countryName": "Ukraine",
      "name": "UA outside line",
      "dialPrefix": "9",
      "dialPostfix": null,
      "status": "ENABLED"
    }
  ]
}

Errors

Code Error Description
401 PERMISSION_DENIED Not an admin session