Get Order for Customer
GET/orders/ {orderId}/
v2
GET
order-get-order
Get details of a single Order, User must have access to the Order/Customer.
Request
- orderIdstring (uuid)requiredExample:
"123e4567-e89b-12d3-a456-426614174000"
Responses
application/json
- Schema documentation
- Example
- JSON Schema
- contractChangeContractIdstring (uuid)
- customerIdstring (≥ 1 characters)required
- dueDatestring (date-time)
- invoicingPeriodnumberrequired
Invoicing period in months
- itemsarray of objectrequired
- Array[
- *object
- addonsarray of object
- Array[
- *object
- hiddenboolean
- keystringrequired
- valuestringrequired
]
- articleIdstringrequired
- articleNamestring
- articleTemplateNamestring
- attributeConfigurationarray of object
- Array[
- *object
- keystringrequired
- valuestring
]
- isInclusivebooleanrequired
- orderItemIdstring (uuid)required
- predefinedDomainAggregateIdstring
- pricenumberrequired
- referenceobject
- contractItemIdstring (uuid)
- offerItemIdstring (uuid)
- orderItemIdstring (uuid)
]
orderDatestring (date-time)
orderIdstring (uuid)
required
orderNumberstring (≥ 1 characters)
required
profileobject
- emailstring (email)required
- firstNamestring
- lastNamestring
- titlestring (one of: other, mr, ms)
the users title
- userIdstring (uuid)required
statusstring (one of: NEW, CONFIRMED, REJECTED, ABORTED, EXECUTED)
required
summaryobject
required
- nonRecurringnumberrequired
- recurringnumberrequired
- summarynumberrequired
The total price of the order
typestring (one of: NEW_ORDER, CONTRACT_CHANGE)
required
{
"contractChangeContractId": "f0f86186-0a5a-45b2-aa33-502777496347",
"customerId": "4317f5c5-1ea8-4084-a9f1-3a8e7e1c94ff",
"dueDate": "2024-12-21T00:27:27.057Z",
"invoicingPeriod": 12,
"items": [
{
"addons": [
{
"hidden": true,
"key": "string",
"value": "string"
}
],
"articleId": "PS23-PLUS-0004",
"articleName": "proSpace",
"articleTemplateName": "Pro-Space-Hosting",
"attributeConfiguration": [
{
"key": "storage",
"value": 10
}
],
"isInclusive": true,
"orderItemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"predefinedDomainAggregateId": "aa38d836-fe72-4c43-aad3-9472b51edf61",
"price": 1000,
"reference": {
"contractItemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"offerItemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"orderItemId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
}
],
"orderDate": "2024-12-21T00:27:27.058Z",
"orderId": "f0f86186-0a5a-45b2-aa33-502777496347",
"orderNumber": "5XXXXXX",
"profile": {
"email": "email@mittwald.example",
"firstName": "Ada",
"lastName": "Lovelace",
"title": "other",
"userId": "f0f86186-0a5a-45b2-aa33-502777496347"
},
"status": "NEW",
"summary": {
"nonRecurring": 1000,
"recurring": 9000,
"summary": 10000
},
"type": "NEW_ORDER"
}
{
"properties": {
"contractChangeContractId": {
"format": "uuid",
"type": "string"
},
"customerId": {
"example": "4317f5c5-1ea8-4084-a9f1-3a8e7e1c94ff",
"minLength": 1,
"type": "string"
},
"dueDate": {
"format": "date-time",
"type": "string"
},
"invoicingPeriod": {
"description": "Invoicing period in months",
"example": 12,
"type": "number"
},
"items": {
"items": {
"properties": {
"addons": {
"items": {
"properties": {
"hidden": {
"type": "boolean"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
],
"type": "object"
},
"type": "array"
},
"articleId": {
"example": "PS23-PLUS-0004",
"type": "string"
},
"articleName": {
"example": "proSpace",
"type": "string"
},
"articleTemplateName": {
"example": "Pro-Space-Hosting",
"type": "string"
},
"attributeConfiguration": {
"items": {
"properties": {
"key": {
"example": "storage",
"type": "string"
},
"value": {
"example": 10,
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"type": "array"
},
"isInclusive": {
"type": "boolean"
},
"orderItemId": {
"format": "uuid",
"type": "string"
},
"predefinedDomainAggregateId": {
"example": "aa38d836-fe72-4c43-aad3-9472b51edf61",
"type": "string"
},
"price": {
"example": 1000,
"type": "number"
},
"reference": {
"properties": {
"contractItemId": {
"format": "uuid",
"type": "string"
},
"offerItemId": {
"format": "uuid",
"type": "string"
},
"orderItemId": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
},
"required": [
"orderItemId",
"articleId",
"price",
"isInclusive"
],
"type": "object"
},
"type": "array"
},
"orderDate": {
"format": "date-time",
"type": "string"
},
"orderId": {
"format": "uuid",
"type": "string"
},
"orderNumber": {
"example": "5XXXXXX",
"minLength": 1,
"type": "string"
},
"profile": {
"properties": {
"email": {
"format": "email",
"type": "string"
},
"firstName": {
"example": "Ada",
"type": "string"
},
"lastName": {
"example": "Lovelace",
"type": "string"
},
"title": {
"deprecated": true,
"description": "the users title",
"enum": [
"other",
"mr",
"ms"
],
"type": "string"
},
"userId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"userId",
"email"
],
"type": "object"
},
"status": {
"enum": [
"NEW",
"CONFIRMED",
"REJECTED",
"ABORTED",
"EXECUTED"
],
"type": "string"
},
"summary": {
"properties": {
"nonRecurring": {
"example": 1000,
"type": "number"
},
"recurring": {
"example": 9000,
"type": "number"
},
"summary": {
"description": "The total price of the order",
"example": 10000,
"type": "number"
}
},
"required": [
"summary",
"recurring",
"nonRecurring"
],
"type": "object"
},
"type": {
"enum": [
"NEW_ORDER",
"CONTRACT_CHANGE"
],
"type": "string"
}
},
"required": [
"orderId",
"orderNumber",
"summary",
"customerId",
"invoicingPeriod",
"type",
"status",
"items"
],
"type": "object"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/orders/f0f86186-0a5a-45b2-aa33-502777496347
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.orderGetOrder({
"orderId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderGetOrder\OrderGetOrderRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new OrderGetOrderRequest(
orderId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->contract()->orderGetOrder($request);
var_dump($response->getBody();