Skip to main content

Create TariffChange Order

POST/v2/tariff-changes
API version
v2
Request method
POST
Operation ID
order-create-tariff-change

Request​

Responses​

Format
application/json
Description
  • orderIdstringrequired
Content-Type: application/json

{
"orderId": "string"
}
{
"properties": {
"orderId": {
"type": "string"
}
},
"required": [
"orderId"
]
}

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-d '{"tariffChangeData":{"contractId":"string","diskspaceInGiB":20,"spec":{"machineType":"prospace.2cpu.4gb"}},"tariffChangeType":"projectHosting"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/tariff-changes
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.contract.orderCreateTariffChange({
"data": {
"tariffChangeData": {
"contractId": "string",
"diskspaceInGiB": 20,
"spec": {
"machineType": "prospace.2cpu.4gb"
}
},
"tariffChangeType": "projectHosting"
}
});

assertStatus(response, 201);

use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderCreateTariffChange\OrderCreateTariffChangeRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderCreateTariffChange\OrderCreateTariffChangeRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// OrderCreateTariffChangeRequestBody to learn how to construct a valid instance
$body = new OrderCreateTariffChangeRequestBody(/* TODO: ... */);

$request = (new OrderCreateTariffChangeRequest(
body: $body
));
$response = $client->contract()->orderCreateTariffChange($request);

var_dump($response->getBody();

On this page