---
search:
  tags:
    - Orders V2
    - POST
seo:
  description: >-
    Bulk-creates lines for an order. Successful… Reference for the POST
    /api/v2/{team_slug}/{app_slug}/orders/{order_id}/lines endpoint in the
    Management API v2.
sidebar:
  label: Create order lines
  badge: POST
title: Create order lines
type: openapi-operation
---
Bulk-creates lines for an order. Successful entities are returned in data; per-item failures in errors.

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

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

- `lines` (CreateOrderLineItem[], required)

Request body example:

```json
{
  "lines": [
    {
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "tax_group_id": "4496f79f-aa1a-4128-84f5-5c1c0836a341",
      "currency_code": "string",
      "quantity": 0,
      "base_price_amount": 0,
      "total_discount_amount": 0,
      "total_sale_price": 0,
      "total_tax_amount": 0,
      "total_price_amount": 0
    }
  ]
}
```

**Responses**

- `201` — Created (partial success possible)
- `400` — Request-level failure
- `401` — Request-level failure
- `403` — Request-level failure
- `404` — Request-level failure
- `500` — Request-level failure

Response example, 201:

```json
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "tax_group_id": "4496f79f-aa1a-4128-84f5-5c1c0836a341",
      "currency_code": "string",
      "quantity": 0,
      "base_price_amount": 0,
      "total_discount_amount": 0,
      "total_sale_price": 0,
      "total_tax_amount": 0,
      "total_price_amount": 0,
      "product_name": "string",
      "product_number": "string",
      "variant_name": "string",
      "variant_number": "string",
      "short_description": "string",
      "first_image_path": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "line_id": "6cb02bfb-65d4-467b-864d-461e923db664",
      "message": "string"
    }
  ]
}
```
