# Create an Order **POST /v1/Orders** Creates a new Order with the provided OrderViewModel and returns a model with the created order id. ## Servers - https://api.cloudcockpit.com: https://api.cloudcockpit.com () ## Authentication methods - Bearer auth ## Parameters ### Headers - **X-Tenant** (string) The domain used to access the portal. - **Authorization** (string) JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}" - **X-Correlation-Id** (string(uuid)) This header is optional and by setting it you can correlate the audit logs made by this request. ### Body: application/json (object) The order info to create the order. - **id** (string(uuid)) The GUID identifier for the order. - **offerId** (string(uuid)) The GUID identifier for the offer. - **customerId** (string(uuid)) The GUID identifier for the customer. - **resellerId** (string(uuid) | null) The GUID identifier for the reseller. - **providerInstanceId** (string(uuid)) The GUID identifier for the provider instance. - **subscriptionName** (string | null) The name to set in the subscription created by this order. This may be up to 255 characters. - **termDuration** (object) The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears - **billingFrequency** (object) The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None - **segment** (object) The offer segment. Possible values: Commercial, Education, Government or NonProfit - **operation** (object) The order operation type. Possible values: CreateSubscription - **quantity** (integer(int32)) The quantity of licenses to provision for this order. - **subscriptionMargin** (object) This value object contains the price margin for this entity. - **subscriptionInternalId** (string | null) The internal identifier to set in the subscription created by this order. This may be up to 255 characters. - **poNumber** (string | null) The po number to set in the subscription created by this order. This may be up to 255 characters. - **autoRenewEnabled** (boolean) The flag indicating if we want to create the subscription in this order with auto renew enabled or not. - **status** (object) The status of the order. Possible values: Processing, Provisioning, Completed or Failed - **createdDate** (string(date-time)) The date in which this order was created. - **providerData** (string | null) The provider specific data for this order. For generic provider subscriptions, this should not be set. - **parentSubscriptionId** (string(uuid) | null) The GUID identifier for the parent subscription of this order. - **errorMessage** (string | null) The error message if status is failed. ## Responses ### 200 OK #### Body: application/json (object) - **orderId** (string(uuid)) The id of the order that was created on CloudCockpit. ### 400 Bad Request #### Body: application/json (object) - **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. ### 401 Unauthorized ### 403 Forbidden ### 500 Internal Server Error #### Body: application/json (object) - **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. [Powered by Bump.sh](https://bump.sh)