---
title: "Create a new order."
method: POST
path: "/rest/api/orders/"
tags: ["Order"]
---

# Create a new order.

`POST /rest/api/orders/`

Create a new order

## Request body

- RestOrderWriteDTO — This object represents a single order.
  - `platformId` integer, required — <a href='#tag/Order/operation/get_rest_orders_platform_map'>Sale platform account ID</a>
  - `idExternal` string, nullable — External order ID, e.g. on the sales platform
  - `isInvoice` boolean — Does the customer want a VAT invoice?
  - `customerLogin` string
  - `paymentStatus` string, required — Payment status (`0-no payment`, `1-partially paid`, `2-paid in full/amount in accordance with the order`, `3-overpayment`)
  - `paymentType` integer, required — <a href='#tag/Order/operation/get_rest_orders_payment_map'>Payment method ID</a>
  - `originalCurrency` string, required — Order currency
  - `originalAmountTotalWithoutTax` string, nullable, required — Value of the order items without tax
  - `originalAmountTotalWithTax` string, nullable, required — Value of order items including tax
  - `originalAmountTotalPaid` string, nullable, required — Gross amount paid by customer in original currency
  - `sendDateMin` string, date-time, nullable — Minimal shipping date
  - `sendDateMax` string, date-time, nullable — Maximum shipping date
  - `preferences` object — Extra order fields
    - `idUser` string
  - `orderItems` RestOrderItemsDTO[], required — Order items list
    - `id` integer — Product ID in create/update process, Unique Order Item ID in reading process
    - `idExternal` string — External product item ID
    - `ean` string — EAN
    - `sku` string — SKU
    - `originalName` string — Product name
    - `originalCode` string — Product unique code
    - `originalPriceWithTax` string, required — Gross product price
    - `originalPriceWithoutTax` string — Net product price
    - `quantity` integer, required — Quantity of products
    - `tax` '27.00' | '25.00' | '24.00' | '23.00' | '22.00' | '21.00' | '20.00' | '19.00' | '18.00' | '17.00' | '16.00' | '8.00' | '7.00' | '5.00' | '0.00' | '-1.00' | '' — The amount of VAT (VAT value | `''` if TAX is not specified and will be calculated | `'-1'` when exempt from VAT)
    - `unit` string — Product unit
    - `type` string, required — Order item type (`1-Product`, `2-Shipment`, `3-service`)
  - `orderPayments` RestOrderPaymentDTO[] — Order payments list
    - `idExternal` string — External payment ID
    - `type` integer, required — <a href='#tag/Order/operation/get_rest_orders_payment_map'>Payment method ID</a>
    - `paymentDate` string, date-time, nullable, required — Date of payment
    - `amount` string, nullable, required — Amount of payment
    - `comment` string
  - `addressCustomer` RestOrderAddressDTO, required
    - `name` string, required — Client name
    - `phone` string — Client phone
    - `email` string — Client E-mail
    - `streetName` string — Client street name
    - `streetNumber` string — Client street number
    - `city` string — Client city
    - `zipCode` string — Client zip code
    - `country` string — Client country
    - `parcelIdExternal` string — Pickup point ID
    - `parcelName` string — Pickup point name
    - `companyTaxNumber` string — Company tax ID
    - `companyName` string — Company name
  - `addressDelivery` RestOrderAddressDTO2, required
    - `name` string, required — Client name
    - `phone` string — Client phone
    - `email` string — Client E-mail
    - `streetName` string — Client street name
    - `streetNumber` string — Client street number
    - `city` string — Client city
    - `zipCode` string — Client zip code
    - `country` string — Client country
    - `parcelIdExternal` string — Pickup point ID
    - `parcelName` string — Pickup point name
    - `companyTaxNumber` string — Company tax ID
    - `companyName` string — Company name
  - `addressInvoice` RestOrderAddressDTO3
    - `name` string, required — Client name
    - `phone` string — Client phone
    - `email` string — Client E-mail
    - `streetName` string — Client street name
    - `streetNumber` string — Client street number
    - `city` string — Client city
    - `zipCode` string — Client zip code
    - `country` string — Client country
    - `parcelIdExternal` string — Pickup point ID
    - `parcelName` string — Pickup point name
    - `companyTaxNumber` string — Company tax ID
    - `companyName` string — Company name
  - `carrierAccount` integer, required — <a href='#tag/Order/operation/get_rest_orders_carrier_account_map'>Carrier account ID</a>
  - `orderNotes` RestOrderNoteDTO2[] — Order notes and comments
    - `type` 1 | 2 — Type of the note
    - `comment` string, required — Note content
  - `orderedAt` string, date-time, nullable, required — Date when the order was created by the customer
  - `status` integer, required — <a href='#tag/Order/operation/get_rest_orders_shipment_status_map'>Status ID</a>

## Response `200`

Order with the given idExternal already exists

- object
  - `id` string, required — Internal order ID

## Other responses

- `201` — Create order correctly 2
- `401` — Authorization failed
- `404` — Invalid platform ID
- `422` — Validation error

---

[API](https://skmtc.dev/apilo/apis/apilo-rest-api.md) · [All operations](https://skmtc.dev/apilo/apis/apilo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apilo/apilo-rest-api/revisions/a0f9dcdba6cc/schema)
