Skip to content

Billing

All operations require authentication.

8 operationsv1/me/billing · /me/credit
Agent setup

Retrieve all billing reports of consumptionProduction

GET
/1.0/me/billing/report/consumption

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/billing/report/consumption \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Generate consumption billing report for a periodProduction

POST
/1.0/me/billing/report/consumption

Request body (required)

periodEnd
required
stringdate

End date of the report period

periodStart
required
stringdate

Start date of the report period

Response

200CreationResponsesuccessful operation
taskId
read-only
string

Task id of the report

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/billing/report/consumption \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "taskId": "string"}

Retrieve a consumption billing report with task idProduction

GET
/1.0/me/billing/report/consumption/{taskId}

Path parameters

taskId
required
string

Task ID

Response

200Consumptionsuccessful operation
periodEnd
read-only
stringdate

End date of the report period

periodStart
read-only
stringdate

Start date of the report period

report
read-only
string

Url of the report

status
read-only
StatusEnum

Status of the report

ValuesCREATINGERRORREADY
taskId
read-only
string

Task id of the report

Example uses taskId = string

$ curl https://api.eu.ovhcloud.com/1.0/me/billing/report/consumption/{taskId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "periodEnd": "2024-01-01", "periodStart": "2024-01-01", "report": "string", "status": "CREATING", "taskId": "string"}

Retrieve all credit balancesProduction

GET
/1.0/me/credit/balance

Query parameters

type
TypeEnum

Filter by balance type

ValuesBONUSDEPOSITPREPAID_ACCOUNTVOUCHER

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/credit/balance \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Retrieve a credit balanceProduction

GET
/1.0/me/credit/balance/{balanceName}

Path parameters

balanceName
required
string

Balance name

Response

200Balancesuccessful operation
amount
read-only
Price

Balance amount

balanceDetails
read-only
BalanceDetails[]

Balance details, amounts by serviceID

balanceName
read-only
string

Balance name

booked
read-only
BookedMovement[]

Movement already booked on orders

creationDate
read-only
stringdate-time

Balance creation date

expiring
read-only
ExpiringMovement[]

Movement expiring soon

lastUpdate
read-only
stringdate-time

Balance last update

type
read-only
TypeEnum

Balance type

ValuesBONUSDEPOSITPREPAID_ACCOUNTVOUCHER
usable
read-only
boolean

Balance usable

Example uses balanceName = string

$ curl https://api.eu.ovhcloud.com/1.0/me/credit/balance/{balanceName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "balanceDetails": [ { "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "balanceSubName": "string", "expiring": [ { "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "lastUpdate": "2024-01-01T12:00:00Z", "sourceObject": { "id": "string", "name": "string" } } ], "serviceId": 0 } ], "balanceName": "string", "booked": [ { "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "balanceSubName": "string", "orderId": 0 } ], "creationDate": "2024-01-01T12:00:00Z", "expiring": [ { "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "lastUpdate": "2024-01-01T12:00:00Z", "sourceObject": { "id": "string", "name": "string" } } ], "lastUpdate": "2024-01-01T12:00:00Z", "type": "BONUS", "usable": true}

Retrieve movements for a specific balanceProduction

GET
/1.0/me/credit/balance/{balanceName}/movement

Path parameters

balanceName
required
string

Balance name

Response

200integer[]successful operation

Example uses balanceName = string

$ curl https://api.eu.ovhcloud.com/1.0/me/credit/balance/{balanceName}/movement \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Retrieve a specific movement for a credit balanceProduction

GET
/1.0/me/credit/balance/{balanceName}/movement/{movementId}

Path parameters

balanceName
required
string

Balance name

movementId
required
integer

Movement ID

Response

200Movementsuccessful operation
amount
read-only
Price

Movement amount

balanceName
read-only
string

Balance name

creationDate
read-only
stringdate-time

Movement creation date

destinationObject
read-only
SubObject

Object destination of this credit movement

expirationDate
read-only
stringdate-time

Movement expiration date

lastUpdate
read-only
stringdate-time

Movement last update

movementId
read-only
integer

Movement ID

orderId
read-only
integer

Order ID associated to this credit movement

sourceObject
read-only
SubObject

Object source of this credit movement

type
read-only
TypeEnum

Movement type

ValuesBONUSCANCELCREDIT_NOTEEXPIREGIFTMANUALORDERREFUNDUNPAIDUSEVOUCHER

Example uses balanceName = string, movementId = 0

$ curl https://api.eu.ovhcloud.com/1.0/me/credit/balance/{balanceName}/movement/{movementId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "balanceName": "string", "creationDate": "2024-01-01T12:00:00Z", "destinationObject": { "id": "string", "name": "string" }, "expirationDate": "2024-01-01T12:00:00Z", "lastUpdate": "2024-01-01T12:00:00Z", "movementId": 0, "orderId": 0, "sourceObject": { "id": "string", "name": "string" }, "type": "BONUS"}

Validate a code to generate associated credit movementProduction

POST
/1.0/me/credit/code

Request body (required)

inputCode
required
string

Code to validate

serviceId
integer

Restrict credit to a specific service

Response

200Movementsuccessful operation
amount
read-only
Price

Movement amount

balanceName
read-only
string

Balance name

creationDate
read-only
stringdate-time

Movement creation date

destinationObject
read-only
SubObject

Object destination of this credit movement

expirationDate
read-only
stringdate-time

Movement expiration date

lastUpdate
read-only
stringdate-time

Movement last update

movementId
read-only
integer

Movement ID

orderId
read-only
integer

Order ID associated to this credit movement

sourceObject
read-only
SubObject

Object source of this credit movement

type
read-only
TypeEnum

Movement type

ValuesBONUSCANCELCREDIT_NOTEEXPIREGIFTMANUALORDERREFUNDUNPAIDUSEVOUCHER

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/credit/code \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "amount": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "balanceName": "string", "creationDate": "2024-01-01T12:00:00Z", "destinationObject": { "id": "string", "name": "string" }, "expirationDate": "2024-01-01T12:00:00Z", "lastUpdate": "2024-01-01T12:00:00Z", "movementId": 0, "orderId": 0, "sourceObject": { "id": "string", "name": "string" }, "type": "BONUS"}