Destinations API

create new entry

POST /api/rest/admin/destinations

Parameters

Name Description
data[type] Resource type (destinations)
data[attributes][enabled] Enabled
data[attributes][next-rate] Next rate
data[attributes][connect-fee] Connect fee
data[attributes][initial-interval] Initial interval
data[attributes][next-interval] Next interval
data[attributes][dp-margin-fixed] Dp margin fixed
data[attributes][dp-margin-percent] Dp margin percent
data[attributes][initial-rate] Initial rate
data[attributes][asr-limit] Asr limit
data[attributes][acd-limit] Acd limit
data[attributes][short-calls-limit] Short calls limit
data[attributes][prefix] Prefix
data[attributes][reject-calls] Reject calls
data[attributes][use-dp-intervals] Use dp intervals
data[attributes][valid-from] Valid from
data[attributes][valid-till] Valid till
data[attributes][external-id] External id
data[attributes][routing-tag-ids] Routing tag ids
data[attributes][dst-number-min-length] Dst number min length
data[attributes][dst-number-max-length] Dst number max length
data[attributes][reverse-billing] Reverse billing
data[attributes][profit-control-mode-id] Profit control mode id
data[attributes][rate-policy-id] Rate policy id
data[relationships][rate-group] Rate group
data[relationships][routing-tag-modes] Routing tag modes

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjc2LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzQwODUzMDI4fQ.P8eOxFLzSB43eGTq1ZOxDw6xwn3IU2WPVa0JfWF8lbg
Host: example.org
Cookie: 

Route

POST /api/rest/admin/destinations

Body

{"data":{"type":"destinations","attributes":{"enabled":true,"next-rate":0,"connect-fee":0,"initial-interval":60,"next-interval":60,"dp-margin-fixed":0,"dp-margin-percent":0,"initial-rate":0,"dst-number-min-length":0,"dst-number-max-length":100,"reverse-billing":true,"profit-control-mode-id":2,"rate-policy-id":1},"relationships":{"rate-group":{"data":{"type":"rate-groups","id":9}}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"3932b53ca8b0543950d96f7d73b6a3d1"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: ebb58f33-6e5c-4b53-8ed2-3b71fb2402eb
X-Runtime: 0.022851
Content-Length: 1672

Status

201 Created

Body

{
  "data": {
    "id": "4201539",
    "type": "destinations",
    "links": {
      "self": "http://example.org/api/rest/admin/destinations/4201539"
    },
    "attributes": {
      "enabled": true,
      "next-rate": "0.0",
      "connect-fee": "0.0",
      "initial-interval": 60,
      "next-interval": 60,
      "dp-margin-fixed": "0.0",
      "dp-margin-percent": "0.0",
      "initial-rate": "0.0",
      "asr-limit": 0.0,
      "acd-limit": 0.0,
      "short-calls-limit": 0.0,
      "prefix": "",
      "reject-calls": false,
      "use-dp-intervals": false,
      "valid-from": "2025-03-01T18:07:08.702Z",
      "valid-till": "2030-03-01T18:07:08.702Z",
      "external-id": null,
      "routing-tag-ids": [

      ],
      "dst-number-min-length": 0,
      "dst-number-max-length": 100,
      "reverse-billing": true,
      "profit-control-mode-id": 2,
      "rate-policy-id": 1
    },
    "relationships": {
      "rate-group": {
        "links": {
          "self": "http://example.org/api/rest/admin/destinations/4201539/relationships/rate-group",
          "related": "http://example.org/api/rest/admin/destinations/4201539/rate-group"
        }
      },
      "routing-tag-mode": {
        "links": {
          "self": "http://example.org/api/rest/admin/destinations/4201539/relationships/routing-tag-mode",
          "related": "http://example.org/api/rest/admin/destinations/4201539/routing-tag-mode"
        }
      },
      "country": {
        "links": {
          "self": "http://example.org/api/rest/admin/destinations/4201539/relationships/country",
          "related": "http://example.org/api/rest/admin/destinations/4201539/country"
        }
      },
      "network": {
        "links": {
          "self": "http://example.org/api/rest/admin/destinations/4201539/relationships/network",
          "related": "http://example.org/api/rest/admin/destinations/4201539/network"
        }
      },
      "destination-next-rates": {
        "links": {
          "self": "http://example.org/api/rest/admin/destinations/4201539/relationships/destination-next-rates",
          "related": "http://example.org/api/rest/admin/destinations/4201539/destination-next-rates"
        }
      }
    }
  }
}