> ## Documentation Index
> Fetch the complete documentation index at: https://invoca-5bd45748-mintlify-8d5425ca.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Promo Numbers

> Allocate, assign, and release the promotional (promo) tracking phone numbers used for call attribution on advertiser campaigns, via the Network Integration API.

# 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

| 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: In­Call 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.                                                                                                                                                                                                                                                                                                                                     |
| local\_number\_preferences                           | hash                | Both are optional. **"search\_radius\_miles"**: An integer, greater than or equal to 0. Default is 240. Represents the number of miles from the location to search. **"restrict\_search\_to\_state"**: A boolean. Default: True. Used to restrict search to be within state boundaries.                                                                                                                                                                                                                                                                                                        |
| 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"])                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| promo\_type                                          | string (optional)   | For international campaigns that support local or mobile numbers. If not passed then promo numbers will default to the organizational default. (US/CA campaigns will continue to use local\_center for local numbers). "Local" or "Mobile"                                                                                                                                                                                                                                                                                                                                                     |
| adwords\_account\_id                                 | string (optional)   | The ID of the AdWords client account to be associated with this promo number. Requires media type to be set to 'Google Call Extension'. (ex. "627-345-9815")                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| destination\_advertiser\_id\_from\_network           | string (optional)   | The ID of the advertiser in which the promo number is intended to be moved to. If this field is used, **destination\_advertiser\_campaign\_id\_from\_network** also must be included. Do not include this field if you do not intend to move the promo number.                                                                                                                                                                                                                                                                                                                                 |
| destination\_advertiser\_campaign\_id\_from\_network | string (optional)   | The ID of the advertiser campaign in which the promo number is intended to be moved to. If this field is used, **destination\_advertiser\_id\_from\_network** also must be included. Do not include this field if you do not intend to move the promo number.                                                                                                                                                                                                                                                                                                                                  |
| destination\_affiliate\_id\_from\_network            | string (optional)   | The ID of the affiliate in which the promo number is intended to be moved to. Only to be used when moving promo numbers between affiliate campaigns. If this field is used, both **destination\_advertiser\_campaign\_id\_from\_network** and **destination\_advertiser\_id\_from\_network** also must be included. Do not include this field if you do not intend to move the promo number.                                                                                                                                                                                                   |
| hours\_of\_operation                                 | hash (optional)     | Configures when the destination is available to receive calls. If not provided, the campaign's hours of operation settings will apply. **Requirements:** This field is only available for promo numbers that belong to an advertiser campaign (not affiliate campaigns). See hours of operation fields below.                                                                                                                                                                                                                                                                                  |

### 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](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").

Schedules cannot overlap. To remove hours of operation, pass null, empty string, empty array, or empty hash.

### 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 parameter `custom_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".

```json theme={null}
{
  "custom_data": {
    "channel": "Offline newspaper"
  }
}
```

***

## 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.

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
```

***

## GET /promo\_numbers\_by\_id

Get all Promo Numbers (using id\_from\_network)

### Examples

Read all Advertiser Campaign Promo Numbers as an array

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
[
  {
    "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",
    "custom_data": {
      "channel": "Online lead"
    }
  }
]
```

***

Read all Affiliate Campaign Promo Numbers as an array

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
[
  {
    "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",
    "custom_data": {
      "channel": "Online lead"
    }
  }
]
```

***

## 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:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Read a specific Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

## POST /promo\_numbers\_by\_id

Create an Advertiser/Affiliate Promo Number (using id\_from\_network)

### Examples

Create an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "id_from_network": "1234",
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "1234",
  "media_type": "Online: Display",
  "promo_number": "8777657743",
  "description": "Halloween Promo Number 1",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Advertiser Campaign Local Promo Number with tn\_prefix

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "id_from_network": "1234",
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display",
  "local_center": {
    "tn_prefix": "805"
  },
  "tn_prefix_whitelist": ["805"]
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "1234",
  "media_type": "Online: Display",
  "promo_number": "8057657743",
  "description": "Halloween Promo Number 1",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Advertiser Campaign Local Promo Number with city/state

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "id_from_network": "1234",
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display",
  "local_center": {
    "city": "Santa Barbara",
    "state": "CA"
  }
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "1234",
  "media_type": "Online: Display",
  "promo_number": "8057657743",
  "description": "Halloween Promo Number 1",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "id_from_network": "1234",
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "1234",
  "media_type": "Online: Display",
  "promo_number": "8777657743",
  "description": "Halloween Promo Number 1",
  "object_url": "https://invoca.net/p_campaigns/promo_numbers/14/11",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create a Google Call Extension Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "id_from_network": "1234",
  "description": "Google Call Extension Demo",
  "media_type": "Google Call Extension",
  "adwords_account_id": "7567575756755"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "1234",
  "media_type": "Google Call Extension",
  "promo_number": "8777657743",
  "description": "Google Call Extension Demo",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

## 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:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "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/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "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.

***

Moving an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1 Updated",
  "media_type": "Online: Display",
  "destination_advertiser_id_from_network": "123",
  "destination_advertiser_campaign_id_from_network": "456"
}
```

Response Code: 200

Response Body: Same as a GET response, includes all the promo number properties.

***

Moving an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1 Updated",
  "media_type": "Online: Display",
  "destination_advertiser_id_from_network": "123",
  "destination_advertiser_campaign_id_from_network": "456",
  "destination_affiliate_id_from_network": "789"
}
```

Response Code: 200

Response Body: Same as a GET response, includes all the promo number properties.

***

## 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:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
{}
```

***

Delete an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.json
```

Format: application/json

Response Code: 200

Response Body:

```json theme={null}
{}
```

***

## 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.

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
```

***

## GET /promo\_numbers

Get all Promo Numbers (using phone number)

### Examples

Read all Advertiser Campaign Promo Numbers as an array

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
[
  {
    "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",
    "custom_data": {
      "channel": "Online lead"
    }
  }
]
```

***

Read all Affiliate Campaign Promo Numbers as an array

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
[
  {
    "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",
    "custom_data": {
      "channel": "Online lead"
    }
  }
]
```

***

## GET /promo\_numbers/\<promo\_number>

Read a Promo Number (using phone number)

### Examples

Read a specific Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Read a specific Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

## POST /promo\_numbers.json

Create an Advertiser/Affiliate Promo Number (using phone number)

### Examples

Create an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Advertiser Campaign Local Promo Number with tn\_prefix

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display",
  "local_center": {
    "tn_prefix": "805"
  },
  "tn_prefix_whitelist": ["805"]
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Advertiser Campaign Local Promo Number with city/state

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display",
  "local_center": {
    "city": "Santa Barbara",
    "state": "CA"
  }
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{
  "description": "Halloween Promo Number 1",
  "media_type": "Online: Display"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "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",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create a Google Call Extension Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Google Call Extension Demo",
  "media_type": "Google Call Extension",
  "adwords_account_id": "7567575756755"
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "12",
  "media_type": "Google Call Extension",
  "promo_number": "8777657743",
  "description": "Google Call Extension Demo",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "custom_data": {
    "channel": "Online lead"
  }
}
```

***

Create an Advertiser Campaign Promo Number with Hours of Operation

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "My Promo Number",
  "media_type": "Online: Email",
  "hours_of_operation": {
    "open_24_7": false,
    "time_zone": "Pacific Time (US & Canada)",
    "schedules": [
      {
        "day_of_week": "Monday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Tuesday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Wednesday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Thursday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Friday",
        "open_time": "09:00",
        "close_time": "17:00"
      }
    ]
  }
}
```

Response Code: 201

Response Body:

```json theme={null}
{
  "id": 12,
  "id_from_network": "12",
  "media_type": "Online: Email",
  "promo_number": "8777657743",
  "description": "My Promo Number",
  "object_url": "https://invoca.net/a_campaigns/promo_numbers/12",
  "hours_of_operation": {
    "open_24_7": false,
    "time_zone": "Pacific Time (US & Canada)",
    "schedules": [
      {
        "day_of_week": "Monday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Tuesday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Wednesday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Thursday",
        "open_time": "09:00",
        "close_time": "17:00"
      },
      {
        "day_of_week": "Friday",
        "open_time": "09:00",
        "close_time": "17:00"
      }
    ]
  }
}
```

***

## PUT /promo\_numbers/\<promo\_number>

Update a Campaign Promo Number (using phone number)

### Examples

Update an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "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/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{
  "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.

***

Moving an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
```

Format: application/json

Request Body:

```json theme={null}
{
  "description": "Halloween Promo Number 1 Updated",
  "media_type": "Online: Display",
  "destination_advertiser_id_from_network": "123",
  "destination_advertiser_campaign_id_from_network": "456"
}
```

Response Code: 200

Response Body: Same as a GET response, includes all the promo number properties.

***

Moving an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{
  "description": "Halloween Promo Number 1 Updated",
  "media_type": "Online: Display",
  "destination_advertiser_id_from_network": "123",
  "destination_advertiser_campaign_id_from_network": "456",
  "destination_affiliate_id_from_network": "789"
}
```

Response Code: 200

Response Body: Same as a GET response, includes all the promo number properties.

***

## DELETE /promo\_numbers/\<promo\_number>

Delete a Campaign Promo Number (using phone number)

### Examples

Delete an Advertiser Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{}
```

***

Delete an Affiliate Campaign Promo Number

Endpoint:

```
https://invoca.net/api/@@HOURS_OF_OPERATION_API_VERSION/<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:

```json theme={null}
{}
```
