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

> 6 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/lifecycle/

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

## Operations

- `GET /pack/xdsl/{packName}/canCancelResiliation` — Get whether a pack resiliation can be canceled
- `POST /pack/xdsl/{packName}/cancelResiliation` — Cancel the resiliation of an xDSL pack
- `POST /pack/xdsl/{packName}/resiliate` — Resiliate an xDSL pack
- `GET /pack/xdsl/{packName}/resiliationFollowUp` — Get the resiliation follow-up of an xDSL pack
- `GET /pack/xdsl/{packName}/resiliationTerms` — Get the resiliation terms of an xDSL pack
- `GET /pack/xdsl/{packName}/subServices/{domain}/keepServiceTerms` — Get the unpack terms of a service of an xDSL pack

## Get whether a pack resiliation can be canceled

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

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

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

Get whether a pack resiliation can be canceled. Returns whether the ongoing resiliation of the xDSL pack can still be canceled.

### Parameters

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

### Responses

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

```json
true
```

### Example

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

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

print_r($result);
?>
```

## Cancel the resiliation of an xDSL pack

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

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

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

Cancel the resiliation of an xDSL pack. Cancels the ongoing resiliation of the pack. Check first that it can be canceled with canCancelResiliation.

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```

## Resiliate an xDSL pack

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

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

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

Resiliate an xDSL pack. Requests the resiliation of the pack at the given date with a resiliation survey, keeping the listed services. Returns the resiliation follow-up.

### 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 |
| --- | --- | --- | --- |
| `resiliationDate` | string (date-time) |  | Effective date of the resiliation |
| `resiliationSurvey` | pack.xdsl.ResiliationSurvey | yes | Comment about resiliation reasons |
| `resiliationSurvey.comment` | string |  | Comment about this resiliation |
| `resiliationSurvey.subsidiary` | string |  | Subsidiary response about this resiliation |
| `resiliationSurvey.type` | pack.xdsl.ResiliationReasonEnum |  | Type of reason for the resiliation — one of `addressMove`, `billingProblems`, `cessationOfActivity`, `changeOfTerms`, `changeOperator`, `eligibilityFtth`, `ftth`, `goToCompetitor`, `other`, `price`, `technicalProblems` |
| `servicesToKeep` | number[] |  | Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices) |

```json
{
  "resiliationDate": "2024-01-01T12:00:00Z",
  "resiliationSurvey": {
    "comment": "string",
    "subsidiary": "string",
    "type": "addressMove"
  },
  "servicesToKeep": [
    0
  ]
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dateTodo` | string (date-time) |  | Date when the resiliation will take effect |
| `needModemReturn` | boolean |  | If the customer needs to return his modem |
| `registrationDate` | string (date-time) |  | Date when the resiliation was asked |
| `status` | string |  | Status of the resiliation |

```json
{
  "dateTodo": "2024-01-01T12:00:00Z",
  "needModemReturn": true,
  "registrationDate": "2024-01-01T12:00:00Z",
  "status": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/pack/xdsl/{packName}/resiliate" \
  -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: double[]
result = client.post("/pack/xdsl/{packName}/resiliate",
	resiliationDate = None, # Effective date of the resiliation (type: datetime, nullable)
	resiliationSurvey = None, # Comment about resiliation reasons (type: pack.xdsl.ResiliationSurvey)
	servicesToKeep = None, # Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices) (type: double[], 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: double[]
$result = $ovh->post("/pack/xdsl/{packName}/resiliate", array(
	resiliationDate => null, // Effective date of the resiliation (type: datetime, nullable)
	resiliationSurvey => null, // Comment about resiliation reasons (type: pack.xdsl.ResiliationSurvey)
	servicesToKeep => null, // Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices) (type: double[], nullable)
));

print_r($result);
?>
```

## Get the resiliation follow-up of an xDSL pack

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

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

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

Get the resiliation follow-up of an xDSL pack. Returns the status of the ongoing resiliation of the pack, its effective date and whether the modem must be returned.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dateTodo` | string (date-time) |  | Date when the resiliation will take effect |
| `needModemReturn` | boolean |  | If the customer needs to return his modem |
| `registrationDate` | string (date-time) |  | Date when the resiliation was asked |
| `status` | string |  | Status of the resiliation |

```json
{
  "dateTodo": "2024-01-01T12:00:00Z",
  "needModemReturn": true,
  "registrationDate": "2024-01-01T12:00:00Z",
  "status": "string"
}
```

### Example

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

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

print_r($result);
?>
```

## Get the resiliation terms of an xDSL pack

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

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

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

Get the resiliation terms of an xDSL pack. Returns, for a resiliation date, the amount due, the engagement end date, the minimum resiliation date and the resiliation reasons.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `packName` | path | string | yes | The internal name of your pack |
| `resiliationDate` | query | string (date-time) |  | The desired resiliation date |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `due` | order.Price |  | Price due at resiliationDate |
| `due.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `due.text` | string |  |  |
| `due.value` | number |  |  |
| `engageDate` | string (date-time) |  | Date until which the customer is engaged |
| `minResiliationDate` | string (date-time) |  | Minimum date at which the pack can be resiliated |
| `resiliationDate` | string (date-time) |  | Date at which the pack will be resiliated |
| `resiliationReasons` | pack.xdsl.ResiliationReasonEnum[] |  | List of available resiliation reasons |

```json
{
  "due": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "engageDate": "2024-01-01T12:00:00Z",
  "minResiliationDate": "2024-01-01T12:00:00Z",
  "resiliationDate": "2024-01-01T12:00:00Z",
  "resiliationReasons": [
    "addressMove"
  ]
}
```

### Example

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

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

print_r($result);
?>
```

## Get the unpack terms of a service of an xDSL pack

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

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

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

Get the unpack terms of a service of an xDSL pack. Returns whether the service can be taken out of the pack, the price billed and its renewal price and period.

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `isAllowed` | boolean |  | Tells whether or not the service can be unpacked |
| `price` | order.Price |  | Price bill on the unpack action |
| `price.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `price.text` | string |  |  |
| `price.value` | number |  |  |
| `renewPeriod` | number |  | Renew period in month of the service |
| `renewPrice` | order.Price |  | The price it will cost when it will be renew |
| `renewPrice.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `renewPrice.text` | string |  |  |
| `renewPrice.value` | number |  |  |

```json
{
  "isAllowed": true,
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "renewPeriod": 0,
  "renewPrice": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  }
}
```

### Example

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

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

print_r($result);
?>
```
