A thin wrapper around Invoca API - see PDQ-3159 for more information.

campaigns_ids: a list of campaign IDs (required if brands_id is empty)

brands_ids: a list of brand IDs (required if campaigns_id is empty)

channels: One of these strings: CA, MY, RL, TV, DM, PP, Social, MT

client_info: a JSON object with browser signature

request_data_shared_params: a JSON object containing tracking information

destination_settings: a JSON object, looks like it is not being used by the original Invoca client

tag_id: a value in the format 99999/9999999 obtained from the Invoca tag javascript snippet

Example:

curl https://consumeraffairs.com/api/invoca/number/?campaigns_ids=1,2

Always return status code 200 with a list of objects. If the call was successful for a given campaign_id, status will be "success" and requestId will be the campaign_id.

[
    {
        "status": "success",
        "formattedNumber": "877-646-5441",
        "invocaId": "i-74c44588-b074-4112-8b35-1c05c857d51b",
        "countryCode": "1",
        "nationalNumber": "8776465441",
        "requestId": "325231",
        "campaignId": "2521",
        "brandId": "325",
        "overflow": null,
        "surge": null,
        "lifetimeInSeconds": 300
    },
    {
        "status": "not_found",
        "message": "No RingPool could be found matching your request",
        "requestId": "325233"
    }
]
GET /api/invoca/number/
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "status": "validation_error",
        "data": {
            "details": [
                "\"brands_ids\" or \"campaigns_ids\" are required fields"
            ]
        }
    }
]