Number Orders

Bulk requests to purchase new tracking numbers from a provider for an offer, pool, traffic source or schedule.

GET /number_orders

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders

List Number Orders.

Lists Number Orders, which are requests to purchase new tracking numbers and assign them to an offer, schedule, traffic source, or number pool.

Params

Param name Description
ids
Optional

Return records matching these ids.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

fulltext
Optional

Search for any record that matches this text

  • Must be a String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • paused
  • offer_id
  • ring_pool_id
  • traffic_source_id
  • schedule_id
  • name
  • description
  • provider_configuration_id
  • numbers_count
  • fallback_to_any_number_in_state
  • number_order_prefix_ids
  • Must be a String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /number_orders/new

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders/new

Build Number Order with defaults.

Builds a Number Order with default attributes without saving it.

Params

Param name Description
offer_id
Optional Blank value allowed

The offer the ordered numbers will be assigned to.

ring_pool_id
Optional Blank value allowed

The number pool the ordered numbers will be added to.

traffic_source_id
Optional Blank value allowed

The traffic source the ordered numbers will be assigned to.

schedule_id
Optional Blank value allowed

The schedule the ordered numbers will be assigned to.

name
Optional Blank value allowed

The name of the number order.

  • Must be a String

description
Optional Blank value allowed

A description of the number order.

  • Must be a String

provider_configuration_id
Optional Blank value allowed

The provider the numbers will be purchased from.

paused
Optional Blank value allowed

Pause the order so it stops purchasing numbers.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

fallback_to_any_number_in_state
Optional Blank value allowed

When no number is available with the requested prefix, allow purchasing any available number in the same state.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

POST /number_orders

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders

Create Number Order.

Creates a Number Order to purchase numbers from the given provider configuration for an offer. Numbers are provisioned asynchronously after the order is created, and only proceed once the company is verified and can afford the numbers being purchased.

Params

Param name Description
offer_id
Optional Blank value allowed

The offer the ordered numbers will be assigned to.

ring_pool_id
Optional Blank value allowed

The number pool the ordered numbers will be added to.

traffic_source_id
Optional Blank value allowed

The traffic source the ordered numbers will be assigned to.

schedule_id
Optional Blank value allowed

The schedule the ordered numbers will be assigned to.

name
Optional Blank value allowed

The name of the number order.

  • Must be a String

description
Optional Blank value allowed

A description of the number order.

  • Must be a String

provider_configuration_id
Optional Blank value allowed

The provider the numbers will be purchased from.

paused
Optional Blank value allowed

Pause the order so it stops purchasing numbers.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

fallback_to_any_number_in_state
Optional Blank value allowed

When no number is available with the requested prefix, allow purchasing any available number in the same state.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /number_orders/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders/:id

Get Number Order by id.

Gets a Number Order's details by id.

PUT /number_orders/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders/:id

Update Number Order by id.

Updates a Number Order's name, description, pause state, or the offer, schedule, traffic source, or number pool it is assigned to.

Params

Param name Description
offer_id
Optional Blank value allowed

The offer the ordered numbers will be assigned to.

ring_pool_id
Optional Blank value allowed

The number pool the ordered numbers will be added to.

traffic_source_id
Optional Blank value allowed

The traffic source the ordered numbers will be assigned to.

schedule_id
Optional Blank value allowed

The schedule the ordered numbers will be assigned to.

name
Optional Blank value allowed

The name of the number order.

  • Must be a String

description
Optional Blank value allowed

A description of the number order.

  • Must be a String

provider_configuration_id
Optional Blank value allowed

The provider the numbers will be purchased from.

paused
Optional Blank value allowed

Pause the order so it stops purchasing numbers.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

fallback_to_any_number_in_state
Optional Blank value allowed

When no number is available with the requested prefix, allow purchasing any available number in the same state.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

DELETE /number_orders/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/number_orders/:id

Destroy Number Order by id.

Deletes a Number Order by id.