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.Properties
Hours of Operation Fields
“open_24_7”: boolean. When true, the destination is always available. When false, schedules must be provided. “time_zone”: string (required). Rails ActiveSupport timezone name (e.g., “Pacific Time (US & Canada)”, “Eastern Time (US & Canada)”, “Central Time (US & Canada)”, “Mountain Time (US & Canada)”, “Arizona”). See https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html for full list. “schedules”: array of hashes (required when open_24_7 is false). Each schedule contains:- “day_of_week”: string. Day of the week: “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, or “Saturday”.
- “open_time”: string. Opening time in HH:MM format (15-minute increments, e.g., “09:00”).
- “close_time”: string. Closing time in HH:MM format (15-minute increments, e.g., “17:00”).
Custom Data
Promo numbers may have Custom Data Fields applied to them, which will be applied to calls originating through the promo number. To apply Custom Data Values to a promo number, the top level parametercustom_data should be assigned a hash with each pair’s key corresponding to a partner name.
The value of the pair should be the value to be applied.
For the following example, we would apply the value “Offline newspaper” to the Custom Data Field “channel”.
Endpoints Using id_from_network
The following endpoints are for use when you have your own IDs (id_from_network) and wish to use that as the identifier.
GET /promo_numbers_by_id
Get all Promo Numbers (using id_from_network)Examples
Read all Advertiser Campaign Promo Numbers as an array Endpoint:Read all Affiliate Campaign Promo Numbers as an array Endpoint:
GET /promo_numbers_by_id/<promo_number_id>
Read a Promo Number (using id_from_network)Examples
Read a specific Advertiser Campaign Promo Number Endpoint:Read a specific Affiliate Campaign Promo Number Endpoint:
POST /promo_numbers_by_id
Create an Advertiser/Affiliate Promo Number (using id_from_network)Examples
Create an Advertiser Campaign Promo Number Endpoint:Create an Advertiser Campaign Local Promo Number with tn_prefix Endpoint:
Create an Advertiser Campaign Local Promo Number with city/state Endpoint:
Create an Affiliate Campaign Promo Number Endpoint:
Create a Google Call Extension Promo Number Endpoint:
PUT /promo_numbers_by_id/<promo_number_id>
Update a Campaign Promo Number (using id_from_network)Examples
Update an Advertiser Campaign Promo Number Endpoint:Update Affiliate Campaign Promo Number Endpoint:
Moving an Advertiser Campaign Promo Number Endpoint:
Moving an Affiliate Campaign Promo Number Endpoint:
DELETE /promo_numbers_by_id/<promo_number_id>
Delete a Campaign Promo Number (using id_from_network)Examples
Delete an Advertiser Campaign Promo Number Endpoint:Delete an Affiliate Campaign Promo Number Endpoint:
Endpoints Using Phone Number as Identifier
The following endpoints are for use when you do not have your own IDs (id_from_network) and you treat the phone number as the identifier.
GET /promo_numbers
Get all Promo Numbers (using phone number)Examples
Read all Advertiser Campaign Promo Numbers as an array Endpoint:Read all Affiliate Campaign Promo Numbers as an array Endpoint:
GET /promo_numbers/<promo_number>
Read a Promo Number (using phone number)Examples
Read a specific Advertiser Campaign Promo Number Endpoint:Read a specific Affiliate Campaign Promo Number Endpoint:
POST /promo_numbers.json
Create an Advertiser/Affiliate Promo Number (using phone number)Examples
Create an Advertiser Campaign Promo Number Endpoint:Create an Advertiser Campaign Local Promo Number with tn_prefix Endpoint:
Create an Advertiser Campaign Local Promo Number with city/state Endpoint:
Create an Affiliate Campaign Promo Number Endpoint:
Create a Google Call Extension Promo Number Endpoint:
Create an Advertiser Campaign Promo Number with Hours of Operation Endpoint:
PUT /promo_numbers/<promo_number>
Update a Campaign Promo Number (using phone number)Examples
Update an Advertiser Campaign Promo Number Endpoint:Update Affiliate Campaign Promo Number Endpoint:
Moving an Advertiser Campaign Promo Number Endpoint:
Moving an Affiliate Campaign Promo Number Endpoint:
DELETE /promo_numbers/<promo_number>
Delete a Campaign Promo Number (using phone number)Examples
Delete an Advertiser Campaign Promo Number Endpoint:Delete an Affiliate Campaign Promo Number Endpoint: