- API-Referenz
- Vertrag
- Preview Order
Preview Order
Request
- orderDataeine von 8 Alternativen
- Alternativeobject
- customerIdstring
- descriptionstring
- diskspaceInGiBnumberrequired
- promotionCodestring
- speceine von 2 Alternativenrequired
- Alternativeobject
- machineTypestring
Has to match the machineType of an available Article exactly. Reachable via the /articles endpoint.
- Alternativeobject
- ramnumber
- vcpunumber
- Alternativeobject
- customerIdstring
- descriptionstring
- diskspaceInGiBnumberrequired
- machineTypestringrequired
- promotionCodestring
- Alternativeobject
- authCodestring
- domainstringrequired
- projectIdstring (uuid)required
- Alternativeobject
- certificateRequestIdstring (uuid)required
- projectIdstring (uuid)required
- Alternativeobject
- reservationLimitintegerrequired
- unlockLimitintegerrequired
- Alternativeobject
- mailAddressIdstring (uuid)required
- syncExistingMailsboolean
- Alternativeobject
- monthlyTokensintegerrequired
- requestsPerMinuteintegerrequired
- Alternativeeine von 1 Alternativen
- Alternativeobject
TYPO3 ELTS license
- descriptionstring
Describe for which typo3 instance the license will be used.
- licenseType"typo3"required
- majorVersionnumberrequired
The major version for which a license should be purchased.
- orderTypestring (einer von: domain, projectHosting, server, externalCertificate, leadFyndr, mailArchive, aiHosting, license)
Content-Type: application/json
{
"orderData": {
"customerId": "string",
"description": "My first project",
"diskspaceInGiB": 20,
"promotionCode": "123456",
"spec": {
"machineType": "prospace.2cpu.4gb"
}
},
"orderType": "domain"
}
{
"properties": {
"orderData": {
"oneOf": [
{
"properties": {
"customerId": {
"type": "string"
},
"description": {
"example": "My first project",
"type": "string"
},
"diskspaceInGiB": {
"example": 20,
"type": "number"
},
"promotionCode": {
"example": "123456",
"type": "string"
},
"spec": {
"oneOf": [
{
"properties": {
"machineType": {
"description": "Has to match the machineType of an available Article exactly. Reachable via the /articles endpoint.",
"example": "prospace.2cpu.4gb",
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"ram": {
"example": 2,
"type": "number"
},
"vcpu": {
"example": 1,
"type": "number"
}
},
"type": "object"
}
]
}
},
"required": [
"diskspaceInGiB",
"spec"
],
"type": "object"
},
{
"properties": {
"customerId": {
"example": "f3435305-fd26-470e-9f21-43d9be7e67e7",
"type": "string"
},
"description": {
"example": "My first server",
"type": "string"
},
"diskspaceInGiB": {
"example": 100,
"type": "number"
},
"machineType": {
"example": "shared.xlarge",
"type": "string"
},
"promotionCode": {
"example": "123456",
"type": "string"
}
},
"required": [
"machineType",
"diskspaceInGiB"
],
"type": "object"
},
{
"properties": {
"authCode": {
"example": "XXXXXXX",
"type": "string"
},
"domain": {
"example": "mittwald.example",
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"domain",
"projectId"
],
"type": "object"
},
{
"properties": {
"certificateRequestId": {
"format": "uuid",
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"projectId",
"certificateRequestId"
],
"type": "object"
},
{
"properties": {
"reservationLimit": {
"example": 15,
"type": "integer"
},
"unlockLimit": {
"example": 80,
"type": "integer"
}
},
"required": [
"unlockLimit",
"reservationLimit"
],
"type": "object"
},
{
"properties": {
"mailAddressId": {
"format": "uuid",
"type": "string"
},
"syncExistingMails": {
"type": "boolean"
}
},
"required": [
"mailAddressId"
],
"type": "object"
},
{
"properties": {
"monthlyTokens": {
"example": 2000000,
"type": "integer"
},
"requestsPerMinute": {
"example": 120,
"type": "integer"
}
},
"required": [
"requestsPerMinute",
"monthlyTokens"
],
"type": "object"
},
{
"oneOf": [
{
"description": "TYPO3 ELTS license",
"properties": {
"description": {
"description": "Describe for which typo3 instance the license will be used.",
"type": "string"
},
"licenseType": {
"enum": [
"typo3"
],
"type": "string"
},
"majorVersion": {
"description": "The major version for which a license should be purchased.",
"example": 12,
"type": "number"
}
},
"required": [
"licenseType",
"majorVersion"
],
"type": "object"
}
]
}
]
},
"orderType": {
"enum": [
"domain",
"projectHosting",
"server",
"externalCertificate",
"leadFyndr",
"mailArchive",
"aiHosting",
"license"
],
"type": "string"
}
},
"type": "object"
}
Responses
- *
Content-Type: application/json
null
{
"anyOf": [
{
"properties": {
"machineTypePrice": {
"example": 500,
"type": "number"
},
"possibleFreeTrialDays": {
"example": 10,
"type": "number"
},
"storagePrice": {
"example": 1000,
"type": "number"
},
"totalPrice": {
"example": 1500,
"type": "number"
}
},
"required": [
"totalPrice",
"storagePrice",
"machineTypePrice"
],
"type": "object"
},
{
"properties": {
"domainContractDuration": {
"description": "Contract duration in months.",
"example": 12,
"type": "number"
},
"domainPrice": {
"example": 800,
"type": "number"
},
"feePrice": {
"example": 100,
"type": "number"
},
"totalPrice": {
"example": 900,
"type": "number"
}
},
"required": [
"totalPrice",
"domainPrice",
"feePrice",
"domainContractDuration"
],
"type": "object"
},
{
"properties": {
"feePrice": {
"example": 900,
"type": "number"
},
"recurringPrice": {
"example": 490,
"type": "number"
},
"totalPrice": {
"example": 1390,
"type": "number"
}
},
"required": [
"totalPrice",
"recurringPrice",
"feePrice"
],
"type": "object"
},
{
"properties": {
"totalPrice": {
"example": 7900,
"type": "number"
}
},
"required": [
"totalPrice"
],
"type": "object"
},
{
"properties": {
"feePrice": {
"example": 199,
"type": "number"
},
"recurringPrice": {
"example": 350,
"type": "number"
},
"totalPrice": {
"example": 549,
"type": "number"
}
},
"required": [
"totalPrice",
"recurringPrice",
"feePrice"
],
"type": "object"
},
{
"properties": {
"totalPrice": {
"example": 500,
"type": "number"
}
},
"required": [
"totalPrice"
],
"type": "object"
},
{
"properties": {
"totalPrice": {
"example": 2000,
"type": "number"
}
},
"required": [
"totalPrice"
],
"type": "object"
}
]
}
Validation Error caused by invalid input data in the request
- type"ValidationError"required
- messagestring
- validationErrorsArray von objectrequired
- Array[
- *object
- messagestringrequired
The standard error message
- pathstringrequired
The path to the part of the data that was validated. JavaScript property access notation (e.g., ".prop[1].subProp") is used.
- typestringrequired
ajv validation error type (e.g. "format", "required", "type") or own validation error types
- contextobject
The object with the additional information about the error that can be used to create custom error messages. Keys depend on the type that failed validation (e.g. "missingProperty" for type "required")
- *string
]
Content-Type: application/json
{
"type": "ValidationError",
"message": "Validation failed",
"validationErrors": [
{
"message": "should be string",
"path": ".address.street",
"type": "format",
"context": {
"format": "email"
}
}
]
}
{
"type": "object",
"required": [
"type",
"validationErrors"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ValidationError"
]
},
"message": {
"type": "string",
"example": "Validation failed"
},
"validationErrors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"path",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "The standard error message",
"example": "should be string"
},
"path": {
"type": "string",
"description": "The path to the part of the data that was validated. JavaScript property access notation (e.g., \".prop[1].subProp\") is used.\n",
"example": ".address.street"
},
"type": {
"type": "string",
"description": "ajv validation error type (e.g. \"format\", \"required\", \"type\") or own validation error types",
"example": "format"
},
"context": {
"type": "object",
"example": {
"format": "email"
},
"description": "The object with the additional information about the error that can be used to create custom error messages. Keys depend on the\ntype that failed validation (e.g. \"missingProperty\" for type \"required\")\n",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
Unprocessable Content
- errorobject
Content-Type: application/json
{
"error": {}
}
{
"properties": {
"error": {
"type": "object"
}
}
}
Your request ran into a rate limit. You have to wait until rate limit expires
- messagestring
- typestring
Content-Type: application/json
{
"message": "too many requests",
"type": "RateLimitError"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "too many requests"
},
"type": {
"type": "string",
"example": "RateLimitError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Nutzungsbeispiele
$ curl \
--fail \
--location \
-X POST \
-d '{"orderData":{"customerId":"string","description":"My first project","diskspaceInGiB":20,"promotionCode":"123456","spec":{"machineType":"prospace.2cpu.4gb"}},"orderType":"domain"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/order-previews
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.orderPreviewOrder({
"data": {
"orderData": {
"customerId": "string",
"description": "My first project",
"diskspaceInGiB": 20,
"promotionCode": "123456",
"spec": {
"machineType": "prospace.2cpu.4gb"
}
},
"orderType": "domain"
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderPreviewOrder\OrderPreviewOrderRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderPreviewOrder\OrderPreviewOrderRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// OrderPreviewOrderRequestBody to learn how to construct a valid instance
$body = new OrderPreviewOrderRequestBody(/* TODO: ... */);
$request = (new OrderPreviewOrderRequest(
body: $body
));
$response = $client->contract()->orderPreviewOrder($request);
var_dump($response->getBody();