{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/1.0"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"me.billing.report.Consumption":{"type":"object","description":"Consumption billing report","properties":{"periodEnd":{"type":"string","description":"End date of the report period","format":"date","readOnly":true},"periodStart":{"type":"string","description":"Start date of the report period","format":"date","readOnly":true},"report":{"type":"string","description":"Url of the report","nullable":true,"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/me.billing.report.consumption.StatusEnum"}],"description":"Status of the report","readOnly":true},"taskId":{"type":"string","description":"Task id of the report","readOnly":true}}},"me.billing.report.consumption.CreationRequest":{"type":"object","description":"Request of consumption billing report creation","properties":{"periodEnd":{"type":"string","description":"End date of the report period","format":"date"},"periodStart":{"type":"string","description":"Start date of the report period","format":"date"}},"required":["periodEnd","periodStart"]},"me.billing.report.consumption.CreationResponse":{"type":"object","description":"Response of consumption billing report creation","properties":{"taskId":{"type":"string","description":"Task id of the report","readOnly":true}}},"me.billing.report.consumption.StatusEnum":{"type":"string","description":"Status of consumption billing report","enum":["CREATING","ERROR","READY"]},"me.credit.Balance":{"type":"object","description":"Missing description","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Balance amount","readOnly":true},"balanceDetails":{"type":"array","description":"Balance details, amounts by serviceID","items":{"$ref":"#/components/schemas/me.credit.balance.BalanceDetails"},"readOnly":true},"balanceName":{"type":"string","description":"Balance name","readOnly":true},"booked":{"type":"array","description":"Movement already booked on orders","items":{"$ref":"#/components/schemas/me.credit.balance.BookedMovement"},"readOnly":true},"creationDate":{"type":"string","description":"Balance creation date","format":"date-time","readOnly":true},"expiring":{"type":"array","description":"Movement expiring soon","items":{"$ref":"#/components/schemas/me.credit.balance.ExpiringMovement"},"readOnly":true},"lastUpdate":{"type":"string","description":"Balance last update","format":"date-time","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/me.credit.balance.TypeEnum"}],"description":"Balance type","readOnly":true},"usable":{"type":"boolean","description":"Balance usable","readOnly":true}}},"me.credit.balance.BalanceDetails":{"type":"object","description":"Missing description","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Balance part amount","readOnly":true},"balanceSubName":{"type":"string","description":"Balance sub name","nullable":true,"readOnly":true},"expiring":{"type":"array","description":"Expiring parts of this balance","items":{"$ref":"#/components/schemas/me.credit.balance.ExpiringMovement"},"readOnly":true},"serviceId":{"type":"integer","description":"Service ID of this balance part","nullable":true,"readOnly":true}}},"me.credit.balance.BookedMovement":{"type":"object","description":"Missing description","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Movement amount","readOnly":true},"balanceSubName":{"type":"string","description":"Balance sub name","nullable":true,"readOnly":true},"orderId":{"type":"integer","description":"Order ID","readOnly":true}}},"me.credit.balance.ExpiringMovement":{"type":"object","description":"Missing description","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Movement amount","readOnly":true},"creationDate":{"type":"string","description":"Movement creation date","format":"date-time","readOnly":true},"expirationDate":{"type":"string","description":"Movement expiration date","format":"date-time","readOnly":true},"lastUpdate":{"type":"string","description":"Movement last update","format":"date-time","readOnly":true},"sourceObject":{"allOf":[{"$ref":"#/components/schemas/me.credit.balance.movement.SubObject"}],"description":"Object source of this credit movement","readOnly":true}}},"me.credit.balance.Movement":{"type":"object","description":"Missing description","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Movement amount","readOnly":true},"balanceName":{"type":"string","description":"Balance name","readOnly":true},"creationDate":{"type":"string","description":"Movement creation date","format":"date-time","readOnly":true},"destinationObject":{"allOf":[{"$ref":"#/components/schemas/me.credit.balance.movement.SubObject"}],"description":"Object destination of this credit movement","nullable":true,"readOnly":true},"expirationDate":{"type":"string","description":"Movement expiration date","nullable":true,"format":"date-time","readOnly":true},"lastUpdate":{"type":"string","description":"Movement last update","format":"date-time","readOnly":true},"movementId":{"type":"integer","description":"Movement ID","readOnly":true},"orderId":{"type":"integer","description":"Order ID associated to this credit movement","nullable":true,"readOnly":true},"sourceObject":{"allOf":[{"$ref":"#/components/schemas/me.credit.balance.movement.SubObject"}],"description":"Object source of this credit movement","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/me.credit.balance.movement.TypeEnum"}],"description":"Movement type","readOnly":true}}},"me.credit.balance.TypeEnum":{"type":"string","description":"Balance type","enum":["BONUS","DEPOSIT","PREPAID_ACCOUNT","VOUCHER"]},"me.credit.balance.movement.SubObject":{"type":"object","description":"Missing description","properties":{"id":{"type":"string","description":"Sub object ID","readOnly":true},"name":{"type":"string","description":"Sub object name","readOnly":true}}},"me.credit.balance.movement.TypeEnum":{"type":"string","description":"Balance movement type","enum":["BONUS","CANCEL","CREDIT_NOTE","EXPIRE","GIFT","MANUAL","ORDER","REFUND","UNPAID","USE","VOUCHER"]},"me.credit.code.Redeem":{"type":"object","description":"Missing description","properties":{"inputCode":{"type":"string","description":"Code to validate"},"serviceId":{"type":"integer","description":"Restrict credit to a specific service"}},"required":["inputCode"]},"order.CurrencyCodeEnum":{"type":"string","description":"Currency code","enum":["AUD","CAD","CZK","EUR","GBP","INR","LTL","MAD","N/A","PLN","SGD","TND","USD","XOF","points"]},"order.Price":{"type":"object","description":"Price with its currency and textual representation","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/order.CurrencyCodeEnum"}],"description":"Currency code","readOnly":true},"priceInUcents":{"type":"integer","description":"Price in microcents","nullable":true,"readOnly":true},"text":{"type":"string","description":"Textual representation","readOnly":true},"value":{"type":"number","description":"The effective price","readOnly":true}}},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/me/billing/report/consumption":{"get":{"summary":"Retrieve all billing reports of consumption","security":[{"oAuth2AuthCode":[]}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/billing/report/consumption\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/billing/report/consumption\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/billing/report/consumption/get","required":true}],"x-expanded-response":"MeBillingReportConsumption"},"post":{"summary":"Generate consumption billing report for a period","security":[{"oAuth2AuthCode":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.billing.report.consumption.CreationRequest"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.billing.report.consumption.CreationResponse"}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: me.billing.report.consumption.CreationRequest\nresult = client.post(\"/me/billing/report/consumption\",\n\tperiodEnd = None, # End date of the report period (type: string)\n\tperiodStart = None, # Start date of the report period (type: string)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: me.billing.report.consumption.CreationRequest\n$result = $ovh->post(\"/me/billing/report/consumption\", array(\n\tperiodEnd => null, // End date of the report period (type: string)\n\tperiodStart => null, // Start date of the report period (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/billing/report/consumption/post","required":true}]}},"/me/billing/report/consumption/{taskId}":{"get":{"summary":"Retrieve a consumption billing report with task id","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"taskId","description":"Task ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.billing.report.Consumption"}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/billing/report/consumption/{taskId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/billing/report/consumption/{taskId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/billing/report/consumption/get","required":true}],"x-response-identifier":"taskId"}},"/me/credit/balance":{"get":{"summary":"Retrieve all credit balances","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"type","description":"Filter by balance type","schema":{"$ref":"#/components/schemas/me.credit.balance.TypeEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/credit/balance\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/credit/balance\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/credit/balance/get","required":true}],"x-expanded-response":"MeCreditBalance"}},"/me/credit/balance/{balanceName}":{"get":{"summary":"Retrieve a credit balance","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"balanceName","description":"Balance name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.credit.Balance"}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/credit/balance/{balanceName}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/credit/balance/{balanceName}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/credit/balance/get","required":true}],"x-response-identifier":"balanceName"}},"/me/credit/balance/{balanceName}/movement":{"get":{"summary":"Retrieve movements for a specific balance","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"balanceName","description":"Balance name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/credit/balance/{balanceName}/movement\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/credit/balance/{balanceName}/movement\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/credit/balance/movement/get","required":true}],"x-expanded-response":"MeCreditBalanceMovement"}},"/me/credit/balance/{balanceName}/movement/{movementId}":{"get":{"summary":"Retrieve a specific movement for a credit balance","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"balanceName","description":"Balance name","required":true,"schema":{"type":"string"}},{"in":"path","name":"movementId","description":"Movement ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.credit.balance.Movement"}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/credit/balance/{balanceName}/movement/{movementId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/credit/balance/{balanceName}/movement/{movementId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/credit/balance/movement/get","required":true}],"x-response-identifier":"movementId"}},"/me/credit/code":{"post":{"summary":"Validate a code to generate associated credit movement","security":[{"oAuth2AuthCode":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.credit.code.Redeem"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.credit.balance.Movement"}}}}},"x-developer-hub-navigation":[["Offers & Services","Billing"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: me.credit.code.Redeem\nresult = client.post(\"/me/credit/code\",\n\tinputCode = None, # Code to validate (type: string)\n\tserviceId = None, # Restrict credit to a specific service (type: integer)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: me.credit.code.Redeem\n$result = $ovh->post(\"/me/credit/code\", array(\n\tinputCode => null, // Code to validate (type: string)\n\tserviceId => null, // Restrict credit to a specific service (type: integer)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/credit/code/validate","required":true}]}}}}
