# Web Cloud › Internet › Pack › Service 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

> 13 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/service/

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

## Operations

- `POST /pack/xdsl/{packName}/changeContact` — Change service contacts
- `GET /pack/xdsl/{packName}/contactOwner` — Get the owner contact of an xDSL pack
- `GET /pack/xdsl/{packName}/promotionCode/capabilities` — Get the promotion code capabilities of an xDSL pack
- `POST /pack/xdsl/{packName}/promotionCode/generate` — Generate a promotion code for an xDSL pack
- `GET /pack/xdsl/{packName}/serviceInfos` — Get service information
- `PUT /pack/xdsl/{packName}/serviceInfos` — Update service information
- `GET /pack/xdsl/{packName}/services` — List the services of an xDSL pack with their usage
- `GET /pack/xdsl/{packName}/shippingAddresses` — List the shipping addresses of an xDSL pack
- `GET /pack/xdsl/{packName}/subServices` — List the services contained in an xDSL pack
- `GET /pack/xdsl/{packName}/subServices/{domain}` — Get a service contained in an xDSL pack
- `GET /pack/xdsl/{packName}/tasks` — List the tasks of an xDSL pack
- `GET /pack/xdsl/{packName}/tasks/{id}` — Get a task of an xDSL pack
- `GET /pack/xdsl/{packName}/xdslAccess/services` — List the xDSL access services of an xDSL pack

## Change service contacts

`POST /1.0/pack/xdsl/{packName}/changeContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#post-pack-xdsl-packname-changecontact

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:changeContact`

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

### 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 |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "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}/changeContact" \
  -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: coreTypes.AccountId:string
result = client.post("/pack/xdsl/{packName}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling = None, # The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech = None, # The contact to set as tech contact (type: coreTypes.AccountId: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: coreTypes.AccountId:string
$result = $ovh->post("/pack/xdsl/{packName}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling => null, // The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech => null, // The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
));

print_r($result);
?>
```

## Get the owner contact of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/contactOwner`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-contactowner

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

Get the owner contact of an xDSL pack. Returns the name, organization, email, phone and postal address of the pack owner.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string |  | contact address |
| `city` | string |  | contact city |
| `country` | nichandle.CountryEnum |  | contact country — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `email` | string |  | contact email |
| `firstname` | string |  | contact firstname |
| `name` | string |  | contact name |
| `organisation` | string |  | contact organisation |
| `phone` | string |  | contact phone |
| `phoneCountry` | nichandle.CountryEnum |  | contact phoneCountry — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `zip` | string |  | contact zip |

```json
{
  "address": "string",
  "city": "string",
  "country": "AC",
  "email": "string",
  "firstname": "string",
  "name": "string",
  "organisation": "string",
  "phone": "string",
  "phoneCountry": "AC",
  "zip": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/contactOwner" \
  -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}/contactOwner")

# 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}/contactOwner");

print_r($result);
?>
```

## Get the promotion code capabilities of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/promotionCode/capabilities`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-promotioncode-capabilities

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:promotionCode/capabilities/get`

Get the promotion code capabilities of an xDSL pack. Returns whether a promotion code can be generated, its amount, the engagement it requires and the reasons when it cannot.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | pack.xdsl.promotionCode.Capabilities | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | order.Price |  | Amount of the promotion code |
| `amount.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `amount.text` | string |  |  |
| `amount.value` | number |  |  |
| `canGenerate` | boolean |  | True if the promotion code generation is available |
| `engagement` | integer |  | Number of months of engagement |
| `reasonCodes` | pack.xdsl.promotionCode.ReasonCodes[] |  | Enum of the possible errors |

```json
{
  "amount": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "canGenerate": true,
  "engagement": 0,
  "reasonCodes": [
    "noMoreAvailable"
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/promotionCode/capabilities" \
  -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}/promotionCode/capabilities")

# 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}/promotionCode/capabilities");

print_r($result);
?>
```

## Generate a promotion code for an xDSL pack

`POST /1.0/pack/xdsl/{packName}/promotionCode/generate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#post-pack-xdsl-packname-promotioncode-generate

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:promotionCode/generate`

Generate a promotion code for an xDSL pack. Creates a new promotion code for 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}/promotionCode/generate" \
  -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}/promotionCode/generate")

# 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}/promotionCode/generate");

print_r($result);
?>
```

## Get service information

`GET /1.0/pack/xdsl/{packName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/serviceInfos" \
  -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}/serviceInfos")

# 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}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/pack/xdsl/{packName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#put-pack-xdsl-packname-serviceinfos

**Status:** Stable production version  
**IAM actions:** `packXdsl:apiovh:serviceInfos/edit`

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/serviceInfos" \
  -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: services.Service
result = client.put("/pack/xdsl/{packName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, 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: services.Service
$result = $ovh->put("/pack/xdsl/{packName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## List the services of an xDSL pack with their usage

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

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

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

List the services of an xDSL pack with their usage. Returns, for each service type of the pack, the number used, the total and the number in creation.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `inCreation` | integer |  |  |
| `name` | pack.xdsl.ServiceNameEnum |  | Service name — one of `domain`, `emailPro`, `exchangeAccount`, `exchangeIndividual`, `exchangeOrganization`, `grt10ho`, `grt20m10ho`, `grt20m4ho`, `grt4ho`, `grt5m10ho`, `grt5m4ho`, `grtAlt`, … |
| `total` | integer |  |  |
| `used` | integer |  |  |

```json
[
  {
    "inCreation": 0,
    "name": "domain",
    "total": 0,
    "used": 0
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/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}/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}/services");

print_r($result);
?>
```

## List the shipping addresses of an xDSL pack

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

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

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

List the shipping addresses of an xDSL pack. Returns the addresses allowed for the given context, such as a migration or a VoIP line order.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `context` | query | pack.xdsl.ShippingAddressContextEnum | yes | Context — one of `migration`, `voipLine` |
| `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}/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}/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}/shippingAddresses");

print_r($result);
?>
```

## List the services contained in an xDSL pack

`GET /1.0/pack/xdsl/{packName}/subServices`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-subservices

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

List the services contained in an xDSL pack. Returns the domains of the services of the pack. Get a service for its type and unpack terms.

### 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}/subServices" \
  -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}/subServices")

# 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}/subServices");

print_r($result);
?>
```

## Get a service contained in an xDSL pack

`GET /1.0/pack/xdsl/{packName}/subServices/{domain}`

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

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

Get a service contained in an xDSL pack. Returns the ID, domain and type of a service of the pack. Its unpack terms come from keepServiceTerms.

### 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.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | read-only |  |
| `id` | number | read-only |  |
| `type` | pack.xdsl.ServiceNameEnum | read-only | Service name — one of `domain`, `emailPro`, `exchangeAccount`, `exchangeIndividual`, `exchangeOrganization`, `grt10ho`, `grt20m10ho`, `grt20m4ho`, `grt4ho`, `grt5m10ho`, `grt5m4ho`, `grtAlt`, … |

```json
{
  "domain": "string",
  "id": 0,
  "type": "domain"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/subServices/{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}/subServices/{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}/subServices/{domain}");

print_r($result);
?>
```

## List the tasks of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-tasks

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

List the tasks of an xDSL pack. Returns the IDs of the tasks scheduled on the pack. Get a task for its function, status and last update date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `function` | query | string |  | Filter the value of function property (=) |
| `packName` | path | string | yes | The internal name of your pack |
| `status` | query | pack.xdsl.TaskStatusEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/tasks" \
  -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}/tasks")

# 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}/tasks");

print_r($result);
?>
```

## Get a task of an xDSL pack

`GET /1.0/pack/xdsl/{packName}/tasks/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/pack/service/#get-pack-xdsl-packname-tasks-id

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

Get a task of an xDSL pack. Returns the function, status and last update date of a task scheduled on the pack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `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 GET \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/tasks/{id}" \
  -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}/tasks/{id}")

# 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}/tasks/{id}");

print_r($result);
?>
```

## List the xDSL access services of an xDSL pack

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

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

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

List the xDSL access services of an xDSL pack. Returns the names of the xDSL accesses of the pack, each usable with the /xdsl calls.

### 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}/xdslAccess/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}/xdslAccess/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}/xdslAccess/services");

print_r($result);
?>
```
