# Offers & Services › Billing groups API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Offers & Services product's sections: https://developers.eu.ovhcloud.com/reference/offers-services/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/offers-services/billing-groups/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/offers-services/billing-groups.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/offers-services/billing-groups.json?format=openapi3

## Operations

- `GET /me/billing/group` — Retrieve all billing groups
- `POST /me/billing/group` — Create a new billing group
- `GET /me/billing/group/{groupId}` — Retrieve information about a billing group
- `PUT /me/billing/group/{groupId}` — Edit billing group
- `DELETE /me/billing/group/{groupId}` — Delete a billing group
- `GET /me/billing/group/{groupId}/service` — Retrieve billing group service ID list
- `POST /me/billing/group/{groupId}/service` — Associate a service to a billing group
- `GET /me/billing/group/{groupId}/service/{serviceId}` — Retrieve information about a billing group service
- `DELETE /me/billing/group/{groupId}/service/{serviceId}` — Unlink a service from a billing group

## Retrieve all billing groups

`GET /1.0/me/billing/group`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#get-me-billing-group

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | query | string |  | Filter by name |
| `serviceId` | query | integer |  | Filter by Service ID |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group" \
  -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("/me/billing/group")

# 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("/me/billing/group");

print_r($result);
?>
```

## Create a new billing group

`POST /1.0/me/billing/group`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#post-me-billing-group

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/create`

### Request body (required)

Type: `me.billing.group.BillingGroup`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactId` | integer |  | Contact ID from /me/contact |
| `creationDate` | string (date-time) | read-only | Creation date |
| `groupId` | integer | read-only | Billing group ID |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `name` | string |  | Billing group unique name |
| `paymentMethodId` | integer |  | Payment method ID associated to the billing group |

```json
{
  "contactId": 0,
  "name": "string",
  "paymentMethodId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.billing.group.BillingGroup | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactId` | integer |  | Contact ID from /me/contact |
| `creationDate` | string (date-time) | read-only | Creation date |
| `groupId` | integer | read-only | Billing group ID |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `name` | string |  | Billing group unique name |
| `paymentMethodId` | integer |  | Payment method ID associated to the billing group |

```json
{
  "contactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "groupId": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "paymentMethodId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group" \
  -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: me.billing.group.BillingGroup
result = client.post("/me/billing/group",
	contactId = None, # Contact ID from /me/contact (type: integer, nullable)
	name = None, # Billing group unique name (type: string)
	paymentMethodId = None, # Payment method ID associated to the billing group (type: integer, 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: me.billing.group.BillingGroup
$result = $ovh->post("/me/billing/group", array(
	contactId => null, // Contact ID from /me/contact (type: integer, nullable)
	name => null, // Billing group unique name (type: string)
	paymentMethodId => null, // Payment method ID associated to the billing group (type: integer, nullable)
));

print_r($result);
?>
```

## Retrieve information about a billing group

`GET /1.0/me/billing/group/{groupId}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#get-me-billing-group-groupid

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.billing.group.BillingGroup | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactId` | integer |  | Contact ID from /me/contact |
| `creationDate` | string (date-time) | read-only | Creation date |
| `groupId` | integer | read-only | Billing group ID |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `name` | string |  | Billing group unique name |
| `paymentMethodId` | integer |  | Payment method ID associated to the billing group |

```json
{
  "contactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "groupId": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "paymentMethodId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}" \
  -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("/me/billing/group/{groupId}")

# 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("/me/billing/group/{groupId}");

print_r($result);
?>
```

## Edit billing group

`PUT /1.0/me/billing/group/{groupId}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#put-me-billing-group-groupid

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |

### Request body (required)

Type: `me.billing.group.BillingGroup`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactId` | integer |  | Contact ID from /me/contact |
| `creationDate` | string (date-time) | read-only | Creation date |
| `groupId` | integer | read-only | Billing group ID |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `name` | string |  | Billing group unique name |
| `paymentMethodId` | integer |  | Payment method ID associated to the billing group |

```json
{
  "contactId": 0,
  "name": "string",
  "paymentMethodId": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}" \
  -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: me.billing.group.BillingGroup
result = client.put("/me/billing/group/{groupId}",
	contactId = None, # Contact ID from /me/contact (type: integer, nullable)
	name = None, # Billing group unique name (type: string)
	paymentMethodId = None, # Payment method ID associated to the billing group (type: integer, 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: me.billing.group.BillingGroup
$result = $ovh->put("/me/billing/group/{groupId}", array(
	contactId => null, // Contact ID from /me/contact (type: integer, nullable)
	name => null, // Billing group unique name (type: string)
	paymentMethodId => null, // Payment method ID associated to the billing group (type: integer, nullable)
));

print_r($result);
?>
```

## Delete a billing group

`DELETE /1.0/me/billing/group/{groupId}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#delete-me-billing-group-groupid

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}" \
  -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.delete("/me/billing/group/{groupId}")

# 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->delete("/me/billing/group/{groupId}");

print_r($result);
?>
```

## Retrieve billing group service ID list

`GET /1.0/me/billing/group/{groupId}/service`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#get-me-billing-group-groupid-service

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/service/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}/service" \
  -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("/me/billing/group/{groupId}/service")

# 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("/me/billing/group/{groupId}/service");

print_r($result);
?>
```

## Associate a service to a billing group

`POST /1.0/me/billing/group/{groupId}/service`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#post-me-billing-group-groupid-service

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/service/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |

### Request body (required)

Type: `me.billing.group.service.Create`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceId` | integer | yes | A service ID to associate |

```json
{
  "serviceId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.billing.group.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `groupId` | integer | read-only | Billing group ID |
| `serviceId` | integer | read-only | Service ID |

```json
{
  "groupId": 0,
  "serviceId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}/service" \
  -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: me.billing.group.service.Create
result = client.post("/me/billing/group/{groupId}/service",
	serviceId = None, # A service ID to associate (type: integer)
)

# 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: me.billing.group.service.Create
$result = $ovh->post("/me/billing/group/{groupId}/service", array(
	serviceId => null, // A service ID to associate (type: integer)
));

print_r($result);
?>
```

## Retrieve information about a billing group service

`GET /1.0/me/billing/group/{groupId}/service/{serviceId}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#get-me-billing-group-groupid-service-serviceid

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/service/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |
| `serviceId` | path | integer | yes | Service ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.billing.group.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `groupId` | integer | read-only | Billing group ID |
| `serviceId` | integer | read-only | Service ID |

```json
{
  "groupId": 0,
  "serviceId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}/service/{serviceId}" \
  -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("/me/billing/group/{groupId}/service/{serviceId}")

# 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("/me/billing/group/{groupId}/service/{serviceId}");

print_r($result);
?>
```

## Unlink a service from a billing group

`DELETE /1.0/me/billing/group/{groupId}/service/{serviceId}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/billing-groups/#delete-me-billing-group-groupid-service-serviceid

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/billing/group/service/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `groupId` | path | integer | yes | Group ID |
| `serviceId` | path | integer | yes | Service ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/billing/group/{groupId}/service/{serviceId}" \
  -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.delete("/me/billing/group/{groupId}/service/{serviceId}")

# 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->delete("/me/billing/group/{groupId}/service/{serviceId}");

print_r($result);
?>
```
