Callback orders

Overview

Manages callback orders associated with a specific SIP account number attached to an authorized user.

The order box has the same number as the account it belongs to.
It is accessed by the IVR script component "Callback".

Callback orders are stored in the collection 'telephony/CallbackRequests'.

The full path collection is available to users to subscribe to changes via websocket subscr and to CRUD operations via websocket rest.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests

Receiving a list of callback orders

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>

Receiving a list of callback orders

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Obtaining the entity of a specific order by identifier

PATCH

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Changing the status of a callback order

DELETE

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Deleting a callback order

For all requests:
Domain Type: working

Receiving a list of callback orders

Returns a list of all orders from the SIP account box specified using the identifier and attached to the authorized user.

The list contains all the specified orders for the time interval linked to the subscriber’s number.
If an Endpoint with a date is used, the source set is all messages for that date.
Otherwise it is necessary to specify the GET-parameter 'interval'.

Request

Request example
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests?interval=["2022-10-21","2022-10-22"]&limit=3 HTTP/1.1

GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21?limit=3 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "abonentPhoneNumber": "1234",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T14:00:37.192Z",
    "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
    "status": "new"
  },
  {
    "abonentPhoneNumber": "12",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T11:06:30.081Z",
    "id": "44745728-0183-fa39-1b40-7cd30a921f58",
    "status": "new"
  },
  {
    "abonentPhoneNumber": "13",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T11:06:27.605Z",
    "id": "2a45dccb-0183-fa39-1195-7cd30a921f58",
    "status": "viewed"
  }
]

Obtaining the entity of a specific order by identifier

Request

Request example
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json

{
  "abonentPhoneNumber": "1234",
  "boxPhoneNumber": "11",
  "dateTime": "2022-10-21T14:00:37.192Z",
  "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
  "status": "new"
}

Changing the status of a callback order

Changes the status of an existing callback order.

Request

Request example
PATCH /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1
Content-Type: application/json

{
  "status": "viewed"
}

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json

{
  "abonentPhoneNumber": "1234",
  "boxPhoneNumber": "11",
  "dateTime": "2022-10-21T14:00:37.192Z",
  "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
  "status": "viewed"
}

Deleting a callback order

Deletes the specified callback order.

Request

Request example
DELETE /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content