---
title: "Create Order"
method: POST
path: "/orders"
tags: ["Orders"]
---

# Create Order

`POST /orders`

## Request

- Base URL: `https://api.pax8.com/v1`
- URL: `https://api.pax8.com/v1/orders`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://token-manager.pax8.com/oauth/token`

Create a new order. Currently NOT supported for scheduled orders(orders with a future date).

## Query parameters

- `isMock` boolean

## Request body

- CreateOrder
  - `id` string, uuid: unique id of the order
  - `companyId` string, uuid, required: unique id of the purchasing company ie. end-user
  - `createdDate` string, date: the date the order was created
  - `orderedBy` 'Pax8 Partner' | 'Customer' | 'Pax8': the type of user who created the order
  - `orderedByUserId` string, uuid: unique id of the user who created this order
  - `orderedByUserEmail` string, email: the email address of the user who created this order
  - `isScheduled` boolean: is ```true``` if order is future dated
  - `lineItems` CreateLineItem[], required
    - `id` string, uuid
    - `productId` string, uuid, required
    - `commitmentTermId` string, uuid: This field is required when the product associated with the order has requiresCommitment field set to true. To pick the correct commitment term, use the https://devx.pax8.com/reference/findproductdependenciesbyproductid endpoint and chose a commitment term whose term field represents an equal or greater time than the desired billingTerm. For example, when the order billingTerm is annual, pass the identifier of the commitment term that matches an annual commitment, or if desired and available, pass a commitment term id of 2-year, or 3-year
    - `provisionStartDate` string, date-time
    - `lineItemNumber` number, required: Required. Number used as a reference to the line item for parent line items
    - `billingTerm` 'Monthly' | 'Annual' | '2-Year' | '3-Year' | 'One-Time' | 'Trial' | 'Activation', required
    - `parentSubscriptionId` string, uuid: Reference to the subscription this item depends on
    - `parentLineItemNumber` number: Reference to the required parent line item in this same order
    - `quantity` number, required: Whole Number
    - `provisioningDetails` ProvisioningDetail[]
      - `label` string: The label to display
      - `key` string: The key
      - `values` string[]: A list of values based on the ```valuetype``` and ```possibleValues```
      - `description` string: Instructions and context to help enter the required provisioning information
      - `valueType` 'Input' | 'Single-Value' | 'Multi-Value': Provisioning Detail Value Type: * `Input` - A value that is supplied by a user * `Single-Value` - A single value that is picked from the `possibleValues` list * `Multi-Value` - One or multiple values that are picked from the `possibleValues` list
      - `possibleValues` string[]: A list of possible values. `possibleValues` will be null when `valueType` is `Input`

## Response `200`

Successful operation

- Order
  - `id` string, uuid: unique id of the order
  - `companyId` string, uuid, required: unique id of the purchasing company ie. end-user
  - `createdDate` string, date: the date the order was created
  - `orderedBy` 'Pax8 Partner' | 'Customer' | 'Pax8': the type of user who created the order
  - `orderedByUserId` string, uuid: unique id of the user who created this order
  - `orderedByUserEmail` string, email: the email address of the user who created this order
  - `isScheduled` boolean: is ```true``` if order is future dated
  - `lineItems` LineItem[], required
    - `id` string, uuid
    - `productId` string, uuid, required
    - `subscriptionId` string, uuid: The original subscription ID for the associated subscription's lineage. See the Subscriptions endpoints for how subscription lineages work.
    - `commitmentTermId` string, uuid
    - `provisionStartDate` string, date-time
    - `lineItemNumber` number, required: Required. Number used as a reference to the line item for parent line items
    - `billingTerm` 'Monthly' | 'Annual' | '2-Year' | '3-Year' | 'One-Time' | 'Trial' | 'Activation'
    - `parentSubscriptionId` string, uuid: Reference to the subscription this item depends on
    - `parentLineItemNumber` number: Reference to the required parent line item in this same order
    - `quantity` number, required: Whole Number
    - `provisioningDetails` ProvisioningDetail[]
      - `label` string: The label to display
      - `key` string: The key
      - `values` string[]: A list of values based on the ```valuetype``` and ```possibleValues```
      - `description` string: Instructions and context to help enter the required provisioning information
      - `valueType` 'Input' | 'Single-Value' | 'Multi-Value': Provisioning Detail Value Type: * `Input` - A value that is supplied by a user * `Single-Value` - A single value that is picked from the `possibleValues` list * `Multi-Value` - One or multiple values that are picked from the `possibleValues` list
      - `possibleValues` string[]: A list of possible values. `possibleValues` will be null when `valueType` is `Input`

## Other responses

- `422`: Invalid order

---

[API](https://skmtc.dev/pax8/apis/partner-endpoints.md) - [All operations](https://skmtc.dev/pax8/apis/partner-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/pax8/apis/partner-endpoints/revisions/f90cec5b4720?raw)
