Promo Numbers¶
Advertiser Campaign and Affiliate Campaign Promo Numbers¶
The API provides the ability to manage promo numbers for a given campaign. Promo numbers are uniquely identified by the phone number itself and these numbers are always generated by the Invoca platform. Therefore, the operations on the promo numbers interface are not idempotent. When you POST a promo number, we return the promo_number in the response body. This capability is JSON‐only.
Property |
Type |
Value |
---|---|---|
id |
integer (read-only) |
The internal Invoca id of the promo number. |
id_from_network |
string |
Network specific id of the promo number. |
description |
string (required) |
Arbitrary description |
media_type |
string (required) |
one of: “Online: Content / Review Site” “Online: Discount / Coupon Site” “Online: Display” “Online: Email” “Online: Rewards / Incentive” “Online: Lead Form / Co Reg” “Online: Search” “Online: Social Media” “Online: Software” “Online: Other” “Mobile: Apps” “Mobile: Display” “Mobile: Search” “Mobile: SMS” “Mobile: Other” “Offline: Business Publication” “Offline: Call Center” “Offline: Direct Mail” “Offline: Directory” “Offline: Newspaper” “Offline: InCall Ad” “Offline: Magazine” “Offline: Outdoor” “Offline: Radio” “Offline: TV” “Offline: Other” |
object_url |
string (read-only) |
URL for reaching the promo number in the UI. |
local_center |
hash |
Requires one of the following City & State required together A filled field determines the center to start looking for local numbers at. “tn_prefix”: an npa “zipcode”: a valid zipcode “city”: a valid city “state”: a valid state |
tn_prefix_whitelist |
array of strings |
an array of stringified limiters on the boundaries of where to look for local numbers given as npas (ex. [“805”, “212”]) |
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
Examples
Read all Advertiser Campaign Promo Numbers as an array
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
Format: application/json
Response Code: 200
Response Body:
[
{
"id": 21,
"id_from_network": "4531",
"media_type": "Online: Display",
"description": "Halloween Promo Number 1",
"promo_number": "8001234567",
"object_url": "https://invoca.net/a_campaigns/promo_numbers/11"
}
]
Read all Affiliate Campaign Promo Numbers as an array
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers.json
Format: application/json
Response Code: 200
Response Body:
[
{
"id": 21,
"id_from_network": "4531",
"media_type": "Online: Display",
"description": "Halloween Promo Number 1",
"promo_number": "8001234567",
"object_url": "https://invoca.net/p_campaigns/promo_numbers/14/11"
}
]
Examples
Read a specific Advertiser Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
Format: application/json
Response Code: 200
Response Body:
{
"id": 21,
"id_from_network": "4531",
"media_type": "Online: Display",
"description": "Halloween Promo Number 1",
"promo_number": "8001234567",
"object_url": "https://invoca.net/a_campaigns/promo_numbers/11"
}
Read a specific Affiliate Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.json
Format: application/json
Response Code: 200
Response Body:
{
"id": 21,
"id_from_network": "4531",
"media_type": "Online: Display",
"description": "Halloween Promo Number 1",
"promo_number": "8001234567",
"object_url": "https://invoca.net/p_campaigns/promo_numbers/14/11"
}
Examples
Create an Advertiser Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1",
"media_type": "Online: Display"
}
Response Code: 201
Response Body:
{
"id": 12,
"id_from_network": "12",
"media_type": "Online: Display",
"promo_number": "8777657743",
"description": "Halloween Promo Number 1",
"object_url": "https://invoca.net/a_campaigns/promo_numbers/12"
}
Create an Advertiser Campaign Local Promo Number with tn_prefix
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1",
"media_type": "Online: Display",
"local_center": {
"tn_prefix": "805"
},
"tn_prefix_whitelist": ["805"]
}
Response Code: 201
Response Body:
{
"id": 12,
"id_from_network": "12",
"media_type": "Online: Display",
"promo_number": "8057657743",
"description": "Halloween Promo Number 1",
"object_url": "https://invoca.net/a_campaigns/promo_numbers/12"
}
Create an Advertiser Campaign Local Promo Number with city/state
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1",
"media_type": "Online: Display",
"local_center": {
"city": "Santa Barbara",
"state": "CA"
}
}
Response Code: 201
Response Body:
{
"id": 12,
"id_from_network": "12",
"media_type": "Online: Display",
"promo_number": "8057657743",
"description": "Halloween Promo Number 1",
"object_url": "https://invoca.net/a_campaigns/promo_numbers/12"
}
Create an Affiliate Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1",
"media_type": "Online: Display"
}
Response Code: 201
Response Body:
{
"id": 12,
"id_from_network": "12",
"media_type": "Online: Display",
"promo_number": "8777657743",
"description": "Halloween Promo Number 1",
"object_url": "https://invoca.net/p_campaigns/promo_numbers/14/11"
}
Examples
Update an Advertiser Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1 Updated",
"media_type": "Online: Display"
}
Response Code: 200
Response Body:
Same as a GET response, includes all the promo number properties.
Update Affiliate Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.json
Format: application/json
Request Body:
{
"description": "Halloween Promo Number 1 Updated",
"media_type": "Online: Display"
}
Response Code: 200
Response Body:
Same as a GET response, includes all the promo number properties.
Examples
Delete an Advertiser Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
Format: application/json
Response Code: 200
Response Body:
{
}
Delete an Affiliate Campaign Promo Number
Endpoint:
https://invoca.net/api/2016-07-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.json
Format: application/json
Response Code: 200
Response Body:
{
}