---
search:
  tags:
    - Orders
    - POST
seo:
  description: >-
    Adds a new order line to an existing order with… Reference for the POST
    /api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines endpoint in the
    Management API.
sidebar:
  label: Create order line
  badge: POST
title: Create order line
type: openapi-operation
---
Adds a new order line to an existing order with quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.

`POST /api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines`

**Request body** (`application/json`, required)

Order line data

- `base_price_amount` (number, required)
- `currency_code` (string, required)
- `product_id` (string, required)
- `quantity` (integer, required)
- `tax_group_id` (string)
- `total_discount_amount` (number)
- `total_price_amount` (number, required)
- `total_tax_amount` (number)
- `variant_id` (string, required)

Request body example:

```json
{
  "base_price_amount": 0,
  "currency_code": "string",
  "product_id": "string",
  "quantity": 1,
  "tax_group_id": "string",
  "total_discount_amount": 0,
  "total_price_amount": 0,
  "total_tax_amount": 0,
  "variant_id": "string"
}
```

**Responses**

- `201` — Order line created successfully
- `400` — Invalid request (validation error, product/variant not found)
- `401` — Unauthorized access
- `404` — Order not found
- `500` — Internal server error

Response example, 201:

```json
{
  "data": {
    "base_price_amount": 0,
    "created_at": "string",
    "currency_code": "string",
    "first_image_path": "string",
    "id": "string",
    "order_id": "string",
    "product_id": "string",
    "product_name": "string",
    "product_number": "string",
    "quantity": 0,
    "short_description": "string",
    "tax_group_id": "string",
    "total_discount_amount": 0,
    "total_price_amount": 0,
    "total_sale_price": 0,
    "total_tax_amount": 0,
    "updated_at": "string",
    "variant_id": "string",
    "variant_name": "string",
    "variant_number": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}
```
