orders
Creates, updates, deletes, gets or lists an orders resource.
Overview​
| Name | orders |
| Type | Resource |
| Id | ovh.me.orders |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
order_id | integer | (wire: orderId) |
date | string (date-time) | |
expiration_date | string (date-time) | (wire: expirationDate) |
metadatas | array | |
password | string | |
pdf_url | string | (wire: pdfUrl) |
price_with_tax | object | Price with its currency and textual representation (wire: priceWithTax) |
price_without_tax | object | Price with its currency and textual representation (wire: priceWithoutTax) |
retraction_date | string (date-time) | (wire: retractionDate) |
tax | object | Price with its currency and textual representation |
url | string |
Details about an Order
| Name | Datatype | Description |
|---|---|---|
order_id | integer | (wire: orderId) |
date | string (date-time) | |
expiration_date | string (date-time) | (wire: expirationDate) |
metadatas | array | |
password | string | |
pdf_url | string | (wire: pdfUrl) |
price_with_tax | object | Price with its currency and textual representation (wire: priceWithTax) |
price_without_tax | object | Price with its currency and textual representation (wire: priceWithoutTax) |
retraction_date | string (date-time) | (wire: retractionDate) |
tax | object | Price with its currency and textual representation |
url | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | order_id | Get this object properties | |
list | select | date.from, date.to, x_pagination_mode | List of all the orders the logged account has | |
update_engagement_number | exec | orderId, engagementNumber | Set your engagement number on this order (Beta version) | |
pay | exec | orderId, paymentMethod | Pay with a payment method reference (Beta version) | |
pay_with_registered_payment_mean | exec | orderId, paymentMean | Pay with an already registered payment mean | |
retraction | exec | orderId, reason | Request retraction of order | |
waive_retraction | exec | orderId | Waive retraction period of 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.
| 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"}}) |
orderId | integer | |
order_id | integer | (wire: orderId) |
date.from | string (date-time) | Filter the value of date property (>=) |
date.to | string (date-time) | Filter the value of date property (<=) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get this object properties
SELECT
order_id,
date,
expiration_date,
metadatas,
password,
pdf_url,
price_with_tax,
price_without_tax,
retraction_date,
tax,
url
FROM ovh.me.orders
WHERE order_id = '{{ order_id }}' -- required
;
List of all the orders the logged account has
SELECT
order_id,
date,
expiration_date,
metadatas,
password,
pdf_url,
price_with_tax,
price_without_tax,
retraction_date,
tax,
url
FROM ovh.me.orders
WHERE date.from = '{{ date.from }}'
AND date.to = '{{ date.to }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- update_engagement_number
- pay
- pay_with_registered_payment_mean
- retraction
- waive_retraction
Set your engagement number on this order (Beta version)
EXEC ovh.me.orders.update_engagement_number
@orderId='{{ orderId }}' --required
@@json=
'{
"engagementNumber": "{{ engagementNumber }}"
}'
;
Pay with a payment method reference (Beta version)
EXEC ovh.me.orders.pay
@orderId='{{ orderId }}' --required
@@json=
'{
"paymentMethod": "{{ paymentMethod }}"
}'
;
Pay with an already registered payment mean
EXEC ovh.me.orders.pay_with_registered_payment_mean
@orderId='{{ orderId }}' --required
@@json=
'{
"paymentMean": "{{ paymentMean }}",
"paymentMeanId": {{ paymentMeanId }}
}'
;
Request retraction of order
EXEC ovh.me.orders.retraction
@orderId='{{ orderId }}' --required
@@json=
'{
"comment": "{{ comment }}",
"reason": "{{ reason }}"
}'
;
Waive retraction period of order
EXEC ovh.me.orders.waive_retraction
@orderId='{{ orderId }}' --required
;