Skip to main content

cart_checkouts

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

Overview​

Namecart_checkouts
TypeResource
Idovh.order.cart_checkouts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
order_idintegerIdentifier of the order (wire: orderId)
contractsarrayList of contracts related to the order
detailsarrayDetails of the order
pricesobjectPrices of the order including with and without taxes
urlstringURL to download the order

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcart_idGet prices and contracts information for your cart
createinsertcart_idValidate your shopping and create order

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"}})
cart_idstringCart ID (wire: cartId)

SELECT examples​

Get prices and contracts information for your cart

SELECT
order_id,
contracts,
details,
prices,
url
FROM ovh.order.cart_checkouts
WHERE cart_id = '{{ cart_id }}' -- required
;

INSERT examples​

Validate your shopping and create order

INSERT INTO ovh.order.cart_checkouts (
auto_pay_with_preferred_payment_method,
waive_retractation_period,
cart_id
)
SELECT
{{ auto_pay_with_preferred_payment_method }},
{{ waive_retractation_period }},
'{{ cart_id }}'
RETURNING
order_id,
contracts,
details,
prices,
url
;