# pushAsyncCall

In addition to *synchronous* call - where the customer initiate a call and is immediately redirected to the network and media test, then to the first available operator - LiveID+ also supports *asynchronous* calls.
In this mode, the customer submits their information to request a video identification, which an operator will handle at a later time (e.g.: through scheduled appointment).
This can be done using two methods: **pushAsyncCall** and **[service-asyncall](./../app/serviceasyncall)**.
**pushAsyncCall** method puts a video identification call in the system without it being immediately redirected to platform test and then to the first available operator.
Calls entered using **pushAsyncCall** are linked to the **unique ID** provided in the response and can then be initiated using [service-asyncall](./../app/serviceasyncall).

Endpoint: POST /api/service/pushAsyncCall
Version: 2.1.0

## Request fields (application/json):

  - `b64Data` (string)
    **UTF-8 Base64** encoded JSON object containing all the configuration parameters for starting a call.
The object to encode must be structured as follows:

```
{
  id_organization: ...
  id_process: ...
  json: ...
}
```
See [service-webrtc-test](./../app/servicewebrtctest) or [service-start](./../app/servicestart) (depending on the `method` passed) for parameters details.
**Given that all data is already encoded, base64 encoding of the `json` parameter is not required in case of `method=start`.**

  - `method` (string)
    The method used to start the call (`"start"` is preferred).
- `"live"`: the call is started using [service-webrtc-test](./../app/servicewebrtctest)
- `"start"`: the call is started using [service-start](./../app/servicestart)
    Enum: "live", "start"

  - `expire` (string)
    Video identification call's expire date (after this date call will be deleted from system and will no longer usable).

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `service` (string)
    Service endpoint

  - `success` (boolean)
    Success result

  - `uId` (string)
    Unique id of the call

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `service` (string)
    Service endpoint

  - `success` (boolean)
    Success result

  - `errorMessage` (string)
    Description of the message

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `service` (string)
    Service endpoint

  - `success` (boolean)
    Success result

  - `errorMessage` (string)
    Description of the message

