---
title: "Create Customer Order"
method: POST
path: "/customer-orders"
tags: ["customer_order"]
---

# Create Customer Order

`POST /customer-orders`

## Request

- Base URL: `https://app.zenventory.com/rest`
- URL: `https://app.zenventory.com/rest/customer-orders`
- Auth: none declared

Create a new customer order.

## Request body

- object
  - `orderNumber` string: Order number for the customer order. If blank, one will automatically be generated.
  - `clientId` integer: Id of the client that the customer order is for. Defaults to the user's client id.
  - `clientName` string: Name of the client that the customer order is for. Ignored if clientId is provided and is nonzero.
  - `customer` object, required: Customer who placed the order.
    - `id` integer: Id of the customer. If none is provided, will attempt to find an existing customer based on the other customer fields and shipping address. Other fields not used if id is provided.
    - `title` string
    - `name` string: A combination of name and surname is required if the customer is new.
    - `surname` string: A combination of name and surname is required if the customer is new.
    - `email` string
    - `company` string
    - `accountNumber` string: Will only match a customer on this field if provided.
  - `shippingAddress` object, required: Address the customer order is being shipped to. countryCode and at least one line is required for new addresses.
    - `id` integer: Id of the shipping address. Other fields will not be used if provided.
    - `code` string: Used to find an existing address. Other fields not used if an address is successfully found.
    - `company` string
    - `name` string
    - `line1` string
    - `line2` string
    - `line3` string
    - `city` string
    - `state` string
    - `zip` string
    - `countryCode` string
    - `phone` string
  - `billingAddress` object, required: Address the customer order is being billed to. countryCode and at least one line is required for new addresses.
    - `sameAsShipping` boolean: True if the billing address is the same as the shipping address. No other fields will be used if true.
    - `id` integer: Id of the billing address. Other fields will not be used if provided.
    - `code` string: Used to find an existing address. Other fields not used if an address is successfully found.
    - `company` string
    - `name` string
    - `line1` string
    - `line2` string
    - `line3` string
    - `city` string
    - `state` string
    - `zip` string
    - `countryCode` string
    - `phone` string
  - `shipFromWarehouseId` integer: Id of the warehouse the ordered items will be allocated from. If no warehouse parameters are given, then the user's current warehouse will be used.
  - `shipFromWarehouseName` string: Name of the warehouse the ordered items will be allocated from. Ignored if warehouseId is provided.
  - `shipVia` string: Code of the carrier or service to use for shipping.
  - `shipViaPackaging` string: Code of the package type to use for shipping.
  - `shipViaConfirmation` string: Code of the confirmation type to use for shipping.
  - `postageAccount` 'sender' | 'client' | 'recipient': Who to bill for shipping.
  - `postageAccountNumber` string: If provided, attempts to associate the account number with the ship via carrier. Not needed if the account number is already on file.
  - `orderReference` string
  - `projectNumber` string
  - `internalNote` string
  - `noteFromCustomer` string
  - `noteToCustomer` string
  - `notificationEmail` string
  - `userField1` string
  - `userField2` string
  - `userField3` string
  - `myList1` string
  - `myList2` string
  - `buyerPaidShipping` number
  - `dryIceWeight` number
  - `packageSku` string
  - `discountPercentage` number: If not provided, the customer's default discount percentage will be used.
  - `items` object[], required: Items being ordered by the customer.
    - `itemId` integer, required: Id of the item master.
    - `sku` string, required: SKU of the item master. Ignored if itemId is provided.
    - `quantity` integer, required: How many are being ordered. Must be nonzero.
    - `uom` string: The unit of measurement being ordered. Uses the item master's default uom if blank.
    - `price` number: The price which the item is beng sold for. If not provided, the item master's price is used.
    - `discountPercentage` number: Percentage discount to be applied only to this line item. The customer order's discount percentage will be applied on top of this one.
    - `createNew` boolean: If sku is provided, true to create a new item instead of returning an error if no item matches the sku.
  - `saveAsDraft` boolean: True to save the customer order as a draft and finalize at a later time.
  - `skipAutomation` boolean: True to skip all automation rules.

## Response `201`

Success

- CustomerOrder
  - `id` integer
  - `orderNumber` string
  - `orderReference` string
  - `customer` CustomerCompact
    - `id` integer
    - `title` string
    - `name` string
    - `surname` string
    - `email` string
    - `company` string
    - `accountNumber` string
  - `client` ClientCompact
    - `id` integer
    - `name` string
  - `orderedDate` string, date-time
  - `createdDate` string, date-time
  - `modifiedDate` string, date-time
  - `orderPlaced` boolean
  - `createdBy` UserCompact
    - `id` integer
    - `name` string
  - `completed` boolean
  - `completedDate` string, date-time
  - `cancelled` boolean
  - `cancelledDate` string, date-time
  - `cancelledReason` string
  - `cancelledBy` UserCompact
    - `id` integer
    - `name` string
  - `onHold` boolean
  - `onHoldUntil` string, date-time
  - `postageAccount` string
  - `buyerPaidShipping` number
  - `shippingAddress` Address
    - `id` integer
    - `company` string
    - `name` string
    - `line1` string
    - `line2` string
    - `line3` string
    - `city` string
    - `state` string
    - `zip` string
    - `country` string
    - `countryCode` string
    - `phone` string
    - `code` string
    - `verifiedStatus` string
    - `verifiedDate` string, date-time
    - `verifiedMessage` string
  - `billingAddress` Address
    - `id` integer
    - `company` string
    - `name` string
    - `line1` string
    - `line2` string
    - `line3` string
    - `city` string
    - `state` string
    - `zip` string
    - `country` string
    - `countryCode` string
    - `phone` string
    - `code` string
    - `verifiedStatus` string
    - `verifiedDate` string, date-time
    - `verifiedMessage` string
  - `shipVia` string
  - `shipViaPackaging` string
  - `shipViaConfirmation` string
  - `dryIceWeight` number
  - `packageSku` string
  - `shipFromWarehouse` WarehouseCompact
    - `id` integer
    - `name` string
  - `projectNumber` string
  - `discountPercentage` number
  - `orderSource` string
  - `internalNote` string
  - `noteFromCustomer` string
  - `noteToCustomer` string
  - `notificationEmail` string
  - `userField1` string
  - `userField2` string
  - `userField3` string
  - `myList1` string
  - `myList2` string
  - `tags` Tag[]
    - `id` integer
    - `tag` string
    - `note` string
  - `items` CustomerOrderItem[]
    - `id` integer
    - `itemId` integer
    - `sku` string
    - `description` string
    - `orderQuantity` integer
    - `uom` string
    - `quantity` integer
    - `allocatedQuantity` integer
    - `pickedQuantity` integer
    - `price` number
    - `discountPercentage` number
    - `partOfKit` boolean
    - `componentOf` integer
    - `additionalFields` CustomerOrderAdditionalFields
      - `pickedLotNumbers` object[]
        - `lotNumber` string
        - `quantity` number
      - `pickedExpirationDates` object[]
        - `expirationDate` unknown
        - `quantity` number
      - `pickedLotNumbersAndExpirationDates` object[]
        - `lotNumber` string
        - `expirationDate` unknown
        - `quantity` number
      - `pickedSerialNumbers` object[]
        - `serial` string
        - `serialField1` string
        - `serialField2` string
        - `serialField3` string
        - `serialField4` string

---

[API](https://skmtc.dev/zenventory/apis/zenventory-rest-api.md) · [All operations](https://skmtc.dev/zenventory/apis/zenventory-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zenventory/apis/zenventory-rest-api/revisions/b40aa340773b?raw)
