---
title: "Create a new order or update an existing order for the given order number"
method: POST
path: "/orders"
---

# Create a new order or update an existing order for the given order number

`POST /orders`

## Request body

- ORDERSCHEMA — Request body for creating a new order.
  - `order_number` string, required — The unique number for this order.
  - `order_id` string — The internal ID of the order on the custom backend.
  - `shipping_cost` number, float — Cost to ship this order.
  - `shipping_discount` number, float — Discount applied on the shipping cost.
  - `discount` number, float — Discount applied on the total cost (excluding shipping)
  - `order_date` string, date-time, required — Date when the order was placed.
  - `shipping_date` string, date-time — Date when the order is shipped.
  - `payment_methods` string — Methods used to pay for this order.
  - `tags` string — Tag for this order.
  - `line_items` LINEITEMSCHEMA, required
    - `name` string, required — Name of the product in this line item.
    - `sku` string, required — Unique SKU identifier for a particular product variant.
    - `ean` string — EAN code
    - `quantity` integer, required — Quantity of items included in this order line.
    - `price` number, float, required — Price per unit of the item.
    - `discount` number, float — Discount amount on the product
    - `image_url` string — URL to the image
    - `unit_weight_in_grams` number, float — Weight of the item in grams
    - `tags` string — Tag for this line item.
  - `customer` CUSTOMERSCHEMA, required — Structure of a customer object within an order.
    - `email` string, email, required — Email address of the customer.
    - `name` string — Name of the customer
    - `first_name` string — First name of the customer
    - `last_name` string — Last name of the customer
    - `tags` string — Tag for this customer.
    - `address` ADDRESSSCHEMA, required — Structure of an address object within a customer.
      - `first_name` string, required — The first name of the person associated with the address.
      - `last_name` string, required — The last name of the person associated with the address.
      - `street` string, required — The main street or avenue where the address is located.
      - `street_number` string, required — The house number, e.g., '123'.
      - `street_2` string — An optional secondary street line if applicable. For example, an apartment or suite number.
      - `zip` string, required — The postal code for the address.
      - `city` string, required — The city where the address is located.
      - `country` string, required — The country where the address is located.
      - `phone` string — The phone number associated with the address.
      - `province` string — State or province where the address is located, used in regions that have multiple states/provinces within a country.
      - `province_code` string — Two-letter code for the state or province (e.g., 'CA' for California).
      - `company` string — The name of the company associated with the address. Used if the address belongs to a business entity.

## Response `201`

Order created successfully.

## Other responses

- `204` — The request was successful but there's no response payload available.
- `400` — Bad request.
- `401` — Unauthorized.
- `422` — Unprocessable entity.

---

[API](https://skmtc.dev/8returns/apis/order-api-specification.md) · [All operations](https://skmtc.dev/8returns/apis/order-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/8returns/order-api-specification/revisions/b9c9aba289fb/schema)
