> For the complete documentation index, see [llms.txt](https://www.litewm.com/litewm-saas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.litewm.com/litewm-saas/openapis/order-create-update.md).

# Order create/update

#### Order create/update

**URI** `/api/orders`

**Method** `POST`

**Header** `Authorization: Bearer jwt.token.string`

**Header** `Content-Type: application/json`

**Body** raw (json)

```json
{
    "orders":
    [
        {
            "type": "ReceivingOrder",
            "project": "DAD",
            "ref_number": "apitest107",
            "ref_type": "inb",
            "ship_from": "api from address 01",
            "departrue_date": "20220212",
            "ship_to": "api to address 001",
            "delivery_date": "20220305",
            "order_lines":
            [
                {
                    "line_number": "10",
                    "item_code": "6922266446146",
                    "quantity": 102,
                    "unit": "CT",
                    "lot_attributes":
                    ["PackDate:20200703", "ExpiryDate:20230703"]
                }
            ]
        },
        {
            "type": "ShippingOrder",
            "project": "DAD",
            "ref_number": "apitest106",
            "ref_type": "SalesOrd",
            "ship_from": "api from address 01",
            "departrue_date": "20220212",
            "ship_to": "api to address 001",
            "delivery_date": "20220305",
            "order_lines":
            [
                {
                    "line_number": "10",
                    "item_code": "6922266446146",
                    "quantity": 102,
                    "unit": "CT",
                    "lot_attributes":
                    ["PackDate:20200703", "ExpiryDate:20230703"]
                }
            ]
        }
    ]
}
```

**Response** raw (json)

```json
{
    "message": "orders created: 2, updated: 0"
}
```
