Create an Order

POST /v1/Orders

Creates a new Order with the provided OrderViewModel and returns a model with the created order id.

Headers

  • X-Tenant string Required

    This header identifies which tenant to access with this request. This value should be an existent domain for the specified tenant.

  • Authorization string Required

    JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

    Default value is Bearer eyJ0eXAiO....

  • X-Correlation-Id string(UUID)

    This header is optional and by setting it you can correlate the audit logs made by this request.

application/json

Body

View model that represents an order.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object

    The response model that contains the id of the order that was created on CloudCockpit.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object

    This class represents the response which is returned to consumers in case of an error, containing details about it, as well as the correlationId of the performed request so that consumers can supply us that id for us to provide support.

    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object

      This class is used to represent the details of an error and specifies the name of the property and the description of each of the errors associated with that property.

  • Unauthorized

  • Forbidden

  • 500 application/json

    Server Error

    Hide response attributes Show response attributes object

    This class represents the response which is returned to consumers in case of an error, containing details about it, as well as the correlationId of the performed request so that consumers can supply us that id for us to provide support.

    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object

      This class is used to represent the details of an error and specifies the name of the property and the description of each of the errors associated with that property.

POST /v1/Orders
curl \
 -X POST https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/Orders \
 -H "Content-Type: application/json" \
 -H "X-Tenant: string" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string" \
 -d '{"id":"string","offerId":"string","customerId":"string","resellerId":"string","providerInstanceId":"string","subscriptionName":"string","termDuration":{},"billingFrequency":{},"segment":{},"operation":{},"quantity":42,"subscriptionMargin":{"marginRule":{}},"subscriptionInternalId":"string","poNumber":"string","autoRenewEnabled":true,"status":{},"createdDate":"2024-05-04T09:42:00+00:00","providerData":"string","parentSubscriptionId":"string","errorMessage":"string"}'
Request examples
# Headers
X-Tenant: string
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string

# Payload
{
  "id": "string",
  "offerId": "string",
  "customerId": "string",
  "resellerId": "string",
  "providerInstanceId": "string",
  "subscriptionName": "string",
  "termDuration": {},
  "billingFrequency": {},
  "segment": {},
  "operation": {},
  "quantity": 42,
  "subscriptionMargin": {
    "marginRule": {}
  },
  "subscriptionInternalId": "string",
  "poNumber": "string",
  "autoRenewEnabled": true,
  "status": {},
  "createdDate": "2024-05-04T09:42:00+00:00",
  "providerData": "string",
  "parentSubscriptionId": "string",
  "errorMessage": "string"
}
Response examples (200)
{
  "orderId": "573b2955-f31f-4edd-9a52-0226e0b0111f"
}
Response examples (400)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (500)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}