Skip to main content

carts

Creates, updates, deletes, gets or lists a carts resource.

Overview​

Namecarts
TypeResource
Idovh.order.carts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcart_idRetrieve information about a specific cart
listselectdescription, x_pagination_modeList of your OVH order carts
createinsertovh_subsidiaryCreate a new OVH order cart
updateupdatecart_idModify information about a specific cart
deletedeletecart_idDelete a cart
assignexeccartIdAssign an order cart to your account

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.

NameDatatypeDescription
api_hoststringThe 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"}})
cartIdstringCart ID
cart_idstringCart ID (wire: cartId)
descriptionstringFilter the value of description property (=)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Retrieve information about a specific cart

SELECT
*
FROM ovh.order.carts
WHERE cart_id = '{{ cart_id }}' -- required
;

INSERT examples​

Create a new OVH order cart

INSERT INTO ovh.order.carts (
description,
expire,
ovh_subsidiary
)
SELECT
'{{ description }}',
'{{ expire }}',
'{{ ovh_subsidiary }}' /* required */
;

UPDATE examples​

Modify information about a specific cart

UPDATE ovh.order.carts
SET
description = '{{ description }}',
expire = '{{ expire }}'
WHERE
cart_id = '{{ cart_id }}' --required;

DELETE examples​

Delete a cart

DELETE FROM ovh.order.carts
WHERE cart_id = '{{ cart_id }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Assign an order cart to your account

EXEC ovh.order.carts.assign
@cartId='{{ cartId }}' --required
;