Callback

The source of the requests

The Callbacks will come from the IP address 168.119.144.144, which must be included in the ACL on the client’s web server side to ensure correct interaction.

Interaction format

Callbacks are performed over the HTTP protocol. Depending on the version of the callback, data is transmitted either in the request headers or in its body in JSON format.

The configuration and selection of the callback are performed in the HTTP service.

V1

It is used in applications.

Method: any.

The parameters ate passed in the request header:

https://XXXXX/api/1/nvp/public/3602/XXXX?type=endCallback&reference=XXX&state=5&error=19&duration=0&text=1+9+5+1+&appKey=XXXXXX
ParametersDescription
typeType of callback request (startCallback/endCallback)
referenceThe user parameter with which the callback will be called based on the results of the application execution
stateThe result of the application execution
errorError code, or 0 — in case of successful execution
durationDuration of the call
textVariables from the scenario
appKeyThe API key of the application

V2

It is used only for FlashCall.

Method: any other than GET.

The data is transmitted in the request body.

{
  "requestId":"ХХХХХ",
  "appKey":"ХХХХХ",
  "sourceAddr":"",
  "number":"7ХХХХХХХХХХ",
  "vars":"text=3+7+1+4+0+1+",
  "status":"REJECTED",
  "timestamp":"1722314308954"
}
ParametersDescription
requestIdThe unique identifier of the request on the partner’s side
appKeyThe API key of the application
sourseAddrSender’s name
numberPhone number
varsVariables in the scenario
statusStatuses that are assigned in accordance with “Statuses comparison
timestampThe time of the status change in unixtime format

V4

It is used in applications.

Method: regardless of the settings in the interface, always POST.

Scenario parameters and variables are passed in the request body in JSON format.

{
  "reference": "123",
  "type": "endCallback",
  "state": "2",
  "error": "0",
  "duration": "4",
  "appKey":"ХХХХХ",
  "sourceAddr":"ХХХХХ",
  "destAddr": "ХХХХХ",
  "a": "1111",
  "c": "444",
  "b+": "2222",
  "timestamp":"1722314308954"
}
ParametersDescription
referenceThe user parameter with which the callback will be called based on the results of the application execution
typeType of callback request (startCallback/endCallback)
stateThe result of the application execution
errorError code, or 0 — in case of successful execution
durationDuration of the call
appKeyThe API key of the application
sourceAddrOutgoing number
destAddrRecipient’s phone number
a, c, b+Variables from the scenario
timestampThe time of the status change in unixtime format

Description of the state

StateDescription
state=0Initial state
state=1Submitted for processing
state=2Successfully
state=5Unsuccessfully
state=6At work
state=8Internal error
state=10Postponed

Error description

ErrorDescription
error=0Successful completion
error=16Normal completion
error=17The user is busy
error=18There is no response from the user
error=19The user was notified, but did not respond
error=21The call was rejected
error=22The number has been changed
error=27The call is not being serviced
error=28Invalid number format
error=34Circuit/channel overload
error=38The network is not working
On this page