# Offers & Services › Commercial Catalog 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

> 2 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/commercial-catalog/

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

## Operations

- `GET /commercialCatalog/offers` — List all offers
- `GET /commercialCatalog/offers/{id}` — Get details of an offer

## List all offers

`GET /v2/commercialCatalog/offers`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/commercial-catalog/#get-commercialcatalog-offers

**Status:** Stable production version

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `merchants` | query | commercialCatalog.MerchantEnum[] |  | Offer merchant |
| `nature` | query | commercialCatalog.OfferNatureEnum |  | Offer nature — one of `BILLING_PLAN`, `PACK`, `REGULAR`, `STRUCTURAL` |
| `productCode` | query | string |  | Commercial product code |
| `state` | query | commercialCatalog.OfferStateEnum[] |  | Offer state |
| `technicalRequirements` | query | string[] |  | Offer config fields |
| `type` | query | commercialCatalog.OfferTypeEnum |  | Offer type — one of `ATOMIC`, `COMPOSITE` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | commercialCatalog.Offer[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | read-only | Unique code for the offer |
| `commercialRatingValues` | commercialCatalog.CommercialRatingValue[] | read-only | Applicable commercial rating values |
| `commercialRatingValues[].invoiceLabels` | commercialCatalog.InvoiceLabel[] | read-only | Label of the invoice |
| `commercialRatingValues[].invoiceLabels[].label` | string | read-only | Invoice label |
| `commercialRatingValues[].invoiceLabels[].language` | common.LanguageEnum | read-only | Label language — one of `cs_CZ`, `de_DE`, `en_AS`, `en_AU`, `en_CA`, `en_GB`, `en_IE`, `en_IN`, `en_SG`, `en_US`, `en_WW`, `es_ES`, … |
| `commercialRatingValues[].ratingValue` | commercialCatalog.RatingValue | read-only | Rating value to link the offer to |
| `commercialRatingValues[].ratingValue.prices` | commercialCatalog.Price[] | read-only | Price list |
| `commercialRatingValues[].ratingValue.type` | commercialCatalog.RatingValueTypeEnum | read-only | Type of type rating value — one of `PRICE` |
| `descriptions` | commercialCatalog.Description[] | read-only | Offer description |
| `descriptions[].language` | common.LanguageEnum | read-only | Language this wording is written in — one of `cs_CZ`, `de_DE`, `en_AS`, `en_AU`, `en_CA`, `en_GB`, `en_IE`, `en_IN`, `en_SG`, `en_US`, `en_WW`, `es_ES`, … |
| `descriptions[].longLabel` | string | read-only | Full commercial description of the offer, for a product page or a detailed view |
| `descriptions[].shortLabel` | string | read-only | Brief commercial name of the offer, for a list or a summary line |
| `engagements` | commercialCatalog.Engagement[] | read-only | List of engagements available to subscribe the offer to |
| `engagements[].autoReactivation` | boolean | read-only | Whether the engagement reactivates itself |
| `engagements[].validDuration` | string (duration) | read-only | Engagement duration following ISO8601 format |
| `id` | string | read-only | Unique identifier of the offer |
| `legacy` | commercialCatalog.Legacy | read-only | Offer information based on previous model used for migration to the new model |
| `legacy.blobs` | commercialCatalog.Blob | read-only | Contains content from previous model |
| `legacy.blobs.content` | commercialCatalog.BlobContent | read-only | Blob content |
| `legacy.catalog` | commercialCatalog.Catalog | read-only | Catalog used to generate the offer |
| `legacy.catalog.id` | integer | read-only | Identifier of the catalog |
| `legacy.catalog.name` | string | read-only | Catalog name |
| `legacy.plan` | string | read-only | Previous model identifier |
| `nature` | commercialCatalog.OfferNatureEnum | read-only | Offer nature — one of `BILLING_PLAN`, `PACK`, `REGULAR`, `STRUCTURAL` |
| `offers` | commercialCatalog.CompositeOfferCommercialOffer[] | read-only | Sub offers when type is composite |
| `offers[].commercialOffer` | string | read-only | Offer embedded in the composite offer, represented by its id |
| `offers[].max` | integer | read-only | Maximum number of commercial offers which may compose the composite offer. min = max means the quantity is forced. |
| `offers[].min` | integer | read-only | Minimum number of commercial offers which may compose the composite offer |
| `offers[].resourceDeliveryQuantity` | integer | read-only | Number of services the commercial offer is delivered as within the composite offer. Defaults to 1. |
| `product` | commercialCatalog.OfferCommercialProduct | read-only | Product linked to the offer |
| `product.commercialProduct` | commercialCatalog.CommercialProduct | read-only | Commercial product to be linked |
| `product.commercialProduct.code` | string | read-only | Product code |
| `product.commercialProduct.descriptions` | commercialCatalog.Description[] | read-only | Description of the commercial product |
| `product.max` | integer | read-only | Maximum number of product to be included in the offer |
| `product.min` | integer | read-only | Minimum number of product to be included in the offer |
| `technicalRequirements` | commercialCatalog.TechnicalRequirement[] | read-only | List of technical requirements of the product linked to the offer |
| `technicalRequirements[].default` | string | read-only | Value by default |
| `technicalRequirements[].name` | string | read-only | Name of the configuration field |
| `technicalRequirements[].values` | string[] | read-only | List of possible values the technical requirement may have |
| `type` | commercialCatalog.OfferTypeEnum | read-only | Offer type — one of `ATOMIC`, `COMPOSITE` |
| `validity` | commercialCatalog.Validity | read-only | Offer validity information |
| `validity.eolDate` | string (date-time) | read-only | End-of-life datetime of the offer upon which nor offer or service is active |
| `validity.eosDate` | string (date-time) | read-only | End-of-sale datetime of the offer upon which offer is not sold anymore but associated service stays active |
| `validity.startDate` | string (date-time) | read-only | Start datetime of the offer upon which offer and service is available |
| `version` | integer | read-only | Offer version, increase on update |

```json
[
  {
    "code": "string",
    "commercialRatingValues": [
      {
        "invoiceLabels": [
          {
            "label": "string",
            "language": "cs_CZ"
          }
        ],
        "ratingValue": {
          "prices": [
            {
              "amount": null,
              "currencyCode": null
            }
          ],
          "type": "PRICE"
        }
      }
    ],
    "descriptions": [
      {
        "language": "cs_CZ",
        "longLabel": "string",
        "shortLabel": "string"
      }
    ],
    "engagements": [
      {
        "autoReactivation": true,
        "validDuration": "string"
      }
    ],
    "id": "string",
    "legacy": {
      "blobs": {
        "content": {
          "technical": {
            "bandwidth": {
              "guaranteed": null,
              "isMax": null,
              "level": null,
              "max": null,
              "maxUnit": null,
              "unit": null,
              "unlimited": null
            },
            "connection": {
              "clients": null,
              "total": null
            },
            "connectionPerSeconds": {
              "total": null,
              "unit": null
            },
            "cpu": {
              "brand": null,
              "cores": null,
              "frequency": null,
              "maxFrequency": null,
              "model": null,
              "threads": null,
              "type": null
            },
            "ephemeralLocalStorage": {
              "disks": null
            },
            "gpu": {
              "memory": null,
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/commercialCatalog/offers" \
  -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("/v2/commercialCatalog/offers")

# 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("/v2/commercialCatalog/offers");

print_r($result);
?>
```

## Get details of an offer

`GET /v2/commercialCatalog/offers/{id}`

Link: https://developers.eu.ovhcloud.com/reference/offers-services/commercial-catalog/#get-commercialcatalog-offers-id

**Status:** Stable production version

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | commercialCatalog.Offer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | read-only | Unique code for the offer |
| `commercialRatingValues` | commercialCatalog.CommercialRatingValue[] | read-only | Applicable commercial rating values |
| `commercialRatingValues[].invoiceLabels` | commercialCatalog.InvoiceLabel[] | read-only | Label of the invoice |
| `commercialRatingValues[].invoiceLabels[].label` | string | read-only | Invoice label |
| `commercialRatingValues[].invoiceLabels[].language` | common.LanguageEnum | read-only | Label language — one of `cs_CZ`, `de_DE`, `en_AS`, `en_AU`, `en_CA`, `en_GB`, `en_IE`, `en_IN`, `en_SG`, `en_US`, `en_WW`, `es_ES`, … |
| `commercialRatingValues[].ratingValue` | commercialCatalog.RatingValue | read-only | Rating value to link the offer to |
| `commercialRatingValues[].ratingValue.prices` | commercialCatalog.Price[] | read-only | Price list |
| `commercialRatingValues[].ratingValue.type` | commercialCatalog.RatingValueTypeEnum | read-only | Type of type rating value — one of `PRICE` |
| `descriptions` | commercialCatalog.Description[] | read-only | Offer description |
| `descriptions[].language` | common.LanguageEnum | read-only | Language this wording is written in — one of `cs_CZ`, `de_DE`, `en_AS`, `en_AU`, `en_CA`, `en_GB`, `en_IE`, `en_IN`, `en_SG`, `en_US`, `en_WW`, `es_ES`, … |
| `descriptions[].longLabel` | string | read-only | Full commercial description of the offer, for a product page or a detailed view |
| `descriptions[].shortLabel` | string | read-only | Brief commercial name of the offer, for a list or a summary line |
| `engagements` | commercialCatalog.Engagement[] | read-only | List of engagements available to subscribe the offer to |
| `engagements[].autoReactivation` | boolean | read-only | Whether the engagement reactivates itself |
| `engagements[].validDuration` | string (duration) | read-only | Engagement duration following ISO8601 format |
| `id` | string | read-only | Unique identifier of the offer |
| `legacy` | commercialCatalog.Legacy | read-only | Offer information based on previous model used for migration to the new model |
| `legacy.blobs` | commercialCatalog.Blob | read-only | Contains content from previous model |
| `legacy.blobs.content` | commercialCatalog.BlobContent | read-only | Blob content |
| `legacy.catalog` | commercialCatalog.Catalog | read-only | Catalog used to generate the offer |
| `legacy.catalog.id` | integer | read-only | Identifier of the catalog |
| `legacy.catalog.name` | string | read-only | Catalog name |
| `legacy.plan` | string | read-only | Previous model identifier |
| `nature` | commercialCatalog.OfferNatureEnum | read-only | Offer nature — one of `BILLING_PLAN`, `PACK`, `REGULAR`, `STRUCTURAL` |
| `offers` | commercialCatalog.CompositeOfferCommercialOffer[] | read-only | Sub offers when type is composite |
| `offers[].commercialOffer` | string | read-only | Offer embedded in the composite offer, represented by its id |
| `offers[].max` | integer | read-only | Maximum number of commercial offers which may compose the composite offer. min = max means the quantity is forced. |
| `offers[].min` | integer | read-only | Minimum number of commercial offers which may compose the composite offer |
| `offers[].resourceDeliveryQuantity` | integer | read-only | Number of services the commercial offer is delivered as within the composite offer. Defaults to 1. |
| `product` | commercialCatalog.OfferCommercialProduct | read-only | Product linked to the offer |
| `product.commercialProduct` | commercialCatalog.CommercialProduct | read-only | Commercial product to be linked |
| `product.commercialProduct.code` | string | read-only | Product code |
| `product.commercialProduct.descriptions` | commercialCatalog.Description[] | read-only | Description of the commercial product |
| `product.max` | integer | read-only | Maximum number of product to be included in the offer |
| `product.min` | integer | read-only | Minimum number of product to be included in the offer |
| `technicalRequirements` | commercialCatalog.TechnicalRequirement[] | read-only | List of technical requirements of the product linked to the offer |
| `technicalRequirements[].default` | string | read-only | Value by default |
| `technicalRequirements[].name` | string | read-only | Name of the configuration field |
| `technicalRequirements[].values` | string[] | read-only | List of possible values the technical requirement may have |
| `type` | commercialCatalog.OfferTypeEnum | read-only | Offer type — one of `ATOMIC`, `COMPOSITE` |
| `validity` | commercialCatalog.Validity | read-only | Offer validity information |
| `validity.eolDate` | string (date-time) | read-only | End-of-life datetime of the offer upon which nor offer or service is active |
| `validity.eosDate` | string (date-time) | read-only | End-of-sale datetime of the offer upon which offer is not sold anymore but associated service stays active |
| `validity.startDate` | string (date-time) | read-only | Start datetime of the offer upon which offer and service is available |
| `version` | integer | read-only | Offer version, increase on update |

```json
{
  "code": "string",
  "commercialRatingValues": [
    {
      "invoiceLabels": [
        {
          "label": "string",
          "language": "cs_CZ"
        }
      ],
      "ratingValue": {
        "prices": [
          {
            "amount": 0,
            "currencyCode": "AUD"
          }
        ],
        "type": "PRICE"
      }
    }
  ],
  "descriptions": [
    {
      "language": "cs_CZ",
      "longLabel": "string",
      "shortLabel": "string"
    }
  ],
  "engagements": [
    {
      "autoReactivation": true,
      "validDuration": "string"
    }
  ],
  "id": "string",
  "legacy": {
    "blobs": {
      "content": {
        "technical": {
          "bandwidth": {
            "guaranteed": true,
            "isMax": true,
            "level": 0,
            "max": 0,
            "maxUnit": "string",
            "unit": "string",
            "unlimited": true
          },
          "connection": {
            "clients": {
              "concurrency": null,
              "number": null
            },
            "total": 0
          },
          "connectionPerSeconds": {
            "total": 0,
            "unit": "string"
          },
          "cpu": {
            "brand": "string",
            "cores": 0,
            "frequency": 0,
            "maxFrequency": 0,
            "model": "string",
            "threads": 0,
            "type": "string"
          },
          "ephemeralLocalStorage": {
            "disks": [
              null
            ]
          },
          "gpu": {
            "memory": {
              "interface": null,
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/commercialCatalog/offers/{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("/v2/commercialCatalog/offers/{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("/v2/commercialCatalog/offers/{id}");

print_r($result);
?>
```
