# Web Cloud › Internet › Pack › VoIP API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 9 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/internet/pack/voip.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/internet/pack/voip.json?format=openapi3

## Operations

- `GET /pack/xdsl/{packName}/voipBillingAccount/services` — List the VoIP billing account services of an xDSL pack
- `GET /pack/xdsl/{packName}/voipEcofax/services` — List the VoIP Ecofax services of an xDSL pack
- `POST /pack/xdsl/{packName}/voipEcofax/services` — Create a VoIP Ecofax service in an xDSL pack
- `POST /pack/xdsl/{packName}/voipLine/options/customShippingAddress` — Create a shipping address for a VoIP line order
- `GET /pack/xdsl/{packName}/voipLine/options/hardwares` — List the hardware for a VoIP line order
- `GET /pack/xdsl/{packName}/voipLine/options/shippingAddresses` — List the shipping addresses for a VoIP line order
- `GET /pack/xdsl/{packName}/voipLine/services` — List the VoIP line services of an xDSL pack
- `POST /pack/xdsl/{packName}/voipLine/services` — Create a VoIP line service in an xDSL pack
- `GET /pack/xdsl/{packName}/voipLine/services/{domain}` — Get a VoIP line service of an xDSL pack

## List the VoIP billing account services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/voipBillingAccount/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipbillingaccount-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipBillingAccount/services/get`

List the VoIP billing account services of an xDSL pack. Returns the domains of the VoIP billing accounts linked to the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipBillingAccount/services" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipBillingAccount/services")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipBillingAccount/services");

print_r($result);
?>
```

## List the VoIP Ecofax services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/voipEcofax/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipecofax-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipEcofax/services/get`

List the VoIP Ecofax services of an xDSL pack. Returns the domains of the VoIP Ecofax services activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipEcofax/services" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipEcofax/services")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipEcofax/services");

print_r($result);
?>
```

## Create a VoIP Ecofax service in an xDSL pack

`POST /1.0/pack/xdsl/{packName}/voipEcofax/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#post-pack-xdsl-packname-voipecofax-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipEcofax/services/create`

Create a VoIP Ecofax service in an xDSL pack. Activates the VoIP Ecofax service included in the pack. Returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `status` | pack.xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `updateDate` | string (date-time) | read-only |  |

```json
{
  "function": "string",
  "id": 0,
  "status": "cancelled",
  "updateDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipEcofax/services" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/pack/xdsl/{packName}/voipEcofax/services")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/pack/xdsl/{packName}/voipEcofax/services");

print_r($result);
?>
```

## Create a shipping address for a VoIP line order

`POST /1.0/pack/xdsl/{packName}/voipLine/options/customShippingAddress`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#post-pack-xdsl-packname-voipline-options-customshippingaddress

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/options/customShippingAddress/create`

Create a shipping address for a VoIP line order. Adds an address from a name, street address, zip code and city, and returns its shipping ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string | yes | Address, including street name |
| `cityName` | string | yes | City name |
| `firstName` | string | yes | First name |
| `lastName` | string | yes | Last name |
| `zipCode` | string | yes | Zip code |

```json
{
  "address": "string",
  "cityName": "string",
  "firstName": "string",
  "lastName": "string",
  "zipCode": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer | successful operation |

```json
0
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/options/customShippingAddress" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/pack/xdsl/{packName}/voipLine/options/customShippingAddress",
	address = None, # Address, including street name (type: string)
	cityName = None, # City name (type: string)
	firstName = None, # First name (type: string)
	lastName = None, # Last name (type: string)
	zipCode = None, # Zip code (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/pack/xdsl/{packName}/voipLine/options/customShippingAddress", array(
	address => null, // Address, including street name (type: string)
	cityName => null, // City name (type: string)
	firstName => null, // First name (type: string)
	lastName => null, // Last name (type: string)
	zipCode => null, // Zip code (type: string)
));

print_r($result);
?>
```

## List the hardware for a VoIP line order

`GET /1.0/pack/xdsl/{packName}/voipLine/options/hardwares`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipline-options-hardwares

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/options/hardwares/get`

List the hardware for a VoIP line order. Returns the phones available with a VoIP line of the xDSL pack, with their deposit, fees and shipping need.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.VoIPHardware[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `deposit` | order.Price |  | Price with it's currency and textual representation |
| `deposit.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `deposit.text` | string |  |  |
| `deposit.value` | number |  |  |
| `fees` | order.Price |  | Price with it's currency and textual representation |
| `fees.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `fees.text` | string |  |  |
| `fees.value` | number |  |  |
| `image` | string |  |  |
| `label` | string |  |  |
| `max` | integer |  |  |
| `name` | string |  |  |
| `needShipping` | boolean |  |  |
| `url` | string |  |  |

```json
[
  {
    "deposit": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "fees": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "image": "string",
    "label": "string",
    "max": 0,
    "name": "string",
    "needShipping": true,
    "url": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/options/hardwares" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipLine/options/hardwares")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipLine/options/hardwares");

print_r($result);
?>
```

## List the shipping addresses for a VoIP line order

`GET /1.0/pack/xdsl/{packName}/voipLine/options/shippingAddresses`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipline-options-shippingaddresses

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/options/shippingAddresses/get`

List the shipping addresses for a VoIP line order. Returns the addresses the hardware of a VoIP line of the xDSL pack can be shipped to.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.ShippingAddress[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string |  |  |
| `cityName` | string |  |  |
| `countryCode` | string |  |  |
| `firstName` | string |  |  |
| `lastName` | string |  |  |
| `shippingId` | string |  |  |
| `zipCode` | string |  |  |

```json
[
  {
    "address": "string",
    "cityName": "string",
    "countryCode": "string",
    "firstName": "string",
    "lastName": "string",
    "shippingId": "string",
    "zipCode": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/options/shippingAddresses" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipLine/options/shippingAddresses")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipLine/options/shippingAddresses");

print_r($result);
?>
```

## List the VoIP line services of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/voipLine/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipline-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/services/get`

List the VoIP line services of an xDSL pack. Returns the domains of the VoIP line services activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/services" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipLine/services")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipLine/services");

print_r($result);
?>
```

## Create a VoIP line service in an xDSL pack

`POST /1.0/pack/xdsl/{packName}/voipLine/services`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#post-pack-xdsl-packname-voipline-services

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/services/create`

Create a VoIP line service in an xDSL pack. Orders VoIP lines with the given hardware, shipped to a shipping address or a Mondial Relay point. Returns the order.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hardwareNames` | string[] | yes | List of names from hardwares call |
| `mondialRelayId` | string |  | Mondial relay ID |
| `shippingId` | string |  | Shipping ID for the order |

```json
{
  "hardwareNames": [
    "string"
  ],
  "mondialRelayId": "string",
  "shippingId": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.VoIPLineOrder | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `needPayment` | boolean |  | Whether or not this order need to be payed manually |
| `orderId` | integer |  |  |
| `orderUrl` | string |  |  |
| `taskIds` | integer[] |  |  |

```json
{
  "needPayment": true,
  "orderId": 0,
  "orderUrl": "string",
  "taskIds": [
    0
  ]
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/services" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/pack/xdsl/{packName}/voipLine/services",
	hardwareNames = None, # List of names from hardwares call (type: string[])
	mondialRelayId = None, # Mondial relay ID (type: string, nullable)
	shippingId = None, # Shipping ID for the order (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/pack/xdsl/{packName}/voipLine/services", array(
	hardwareNames => null, // List of names from hardwares call (type: string[])
	mondialRelayId => null, // Mondial relay ID (type: string, nullable)
	shippingId => null, // Shipping ID for the order (type: string, nullable)
));

print_r($result);
?>
```

## Get a VoIP line service of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/voipLine/services/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/voip/#get-pack-xdsl-packname-voipline-services-domain

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:voipLine/services/get`

Get a VoIP line service of an xDSL pack. Returns the domain and the billing account of a VoIP line service activated with the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes |  |
| `packName` | path | string | yes | The internal name of your pack |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.VoipLineService | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingAccount` | string | read-only |  |
| `domain` | string | read-only |  |

```json
{
  "billingAccount": "string",
  "domain": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/voipLine/services/{domain}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/pack/xdsl/{packName}/voipLine/services/{domain}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/pack/xdsl/{packName}/voipLine/services/{domain}");

print_r($result);
?>
```
