offers
Creates, updates, deletes, gets or lists an offers resource.
Overview​
| Name | offers |
| Type | Resource |
| Id | ovh.commercial_catalog.offers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the offer |
code | string | Unique code for the offer |
commercial_rating_values | array | Applicable commercial rating values (wire: commercialRatingValues) |
descriptions | array | Offer description |
engagements | array | List of engagements available to subscribe the offer to |
legacy | object | Offer information based on previous model used for migration to the new model |
nature | string | Offer nature (BILLING_PLAN, PACK, REGULAR, STRUCTURAL) |
offers | array | Sub offers when type is composite |
product | object | Product linked to the offer |
technical_requirements | array | List of technical requirements of the product linked to the offer (wire: technicalRequirements) |
type | string | Offer type (ATOMIC, COMPOSITE) |
validity | object | Offer validity information |
version | integer | Offer version, increase on update |
Defines a commercial catalog offer
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the offer |
code | string | Unique code for the offer |
commercial_rating_values | array | Applicable commercial rating values (wire: commercialRatingValues) |
descriptions | array | Offer description |
engagements | array | List of engagements available to subscribe the offer to |
legacy | object | Offer information based on previous model used for migration to the new model |
nature | string | Offer nature (BILLING_PLAN, PACK, REGULAR, STRUCTURAL) |
offers | array | Sub offers when type is composite |
product | object | Product linked to the offer |
technical_requirements | array | List of technical requirements of the product linked to the offer (wire: technicalRequirements) |
type | string | Offer type (ATOMIC, COMPOSITE) |
validity | object | Offer validity information |
version | integer | Offer version, increase on update |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get details of an offer | |
list | select | x_pagination_cursor, x_pagination_size, merchants, nature, product_code, state, technical_requirements, type | List all offers |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
id | string | Id |
merchants | array | Offer merchant |
nature | string | Offer nature |
product_code | string | Commercial product code (wire: productCode) |
state | array | Offer state |
technical_requirements | array | Offer config fields (wire: technicalRequirements) |
type | string | Offer type |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Get details of an offer
SELECT
id,
code,
commercial_rating_values,
descriptions,
engagements,
legacy,
nature,
offers,
product,
technical_requirements,
type,
validity,
version
FROM ovh.commercial_catalog.offers
WHERE id = '{{ id }}' -- required
;
List all offers
SELECT
id,
code,
commercial_rating_values,
descriptions,
engagements,
legacy,
nature,
offers,
product,
technical_requirements,
type,
validity,
version
FROM ovh.commercial_catalog.offers
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND merchants = '{{ merchants }}'
AND nature = '{{ nature }}'
AND product_code = '{{ product_code }}'
AND state = '{{ state }}'
AND technical_requirements = '{{ technical_requirements }}'
AND type = '{{ type }}'
;