---
search:
  tags:
    - Orders
    - POST
seo:
  description: >-
    Adds a single item to the order. Accepts the same fields as one element of
    the… Reference for the POST /orders/{order_id}/items endpoint in the Bolder
    API v2.
sidebar:
  label: Add a line item to an order
  badge: POST
title: Add a line item to an order
type: openapi-operation
---
Adds a single item to the order. Accepts the same fields as one element
of the `line_items` array on order create/update. If the variant is
already in the order, units are updated instead (upsert by variant).

`POST /orders/{order_id}/items`

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

- `variant_id` (string)
- `variant_sku` (string) — Alternative to variant\_id, for linked items
- `units` (integer)
- `price` (integer) — Overrides the product's price, in cents
- `product_name` (string) — Required for detached items (no product record)

Request body example, Linked item (existing product):

```json
{
  "variant_id": "123",
  "units": 2
}
```

Request body example, Detached item (no product record):

```json
{
  "product_name": "Custom Engraving",
  "variant_sku": "ENG-01",
  "price": 1500,
  "units": 1
}
```

**Responses**

- `200` — Updated order (with the new line item)

Response example, 200:

```json
{
  "_links": {
    "property1": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    },
    "property2": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    }
  },
  "id": 0,
  "shop_id": 0,
  "code": "string",
  "external_id": "string",
  "status": "draft",
  "fulfillment_status": "none",
  "checkout_url": "string",
  "archived": true,
  "currency_code": "string",
  "prices_include_tax": true,
  "items_net_total": 0,
  "items_discount_total": 0,
  "items_total": 0,
  "net_total": 0,
  "discount_total": 0,
  "cart_total": 0,
  "surcharge_total": 0,
  "shipping_total": 0,
  "shipping_discount": 0,
  "shipping_minus_discount": 0,
  "tax_rate": 0,
  "tax_total": 0,
  "total": 0,
  "total_paid": 0,
  "total_refunded": 0,
  "max_refundable_amount": 0,
  "partial_payment_offered": true,
  "paying_partially": true,
  "partial_payment_percentage": 0,
  "partial_payment_amount": 0,
  "partial_payment_due_on": "2019-08-24",
  "shipping_description": "string",
  "tracking_code": "string",
  "courier_name": "string",
  "payment_info": {
    "id": 0,
    "name": "string",
    "type": "string",
    "data": {}
  },
  "requested_document_type": "string",
  "tags": [
    "string"
  ],
  "tag_ids": [
    0
  ],
  "allowed_statuses": [
    "string"
  ],
  "allowed_fulfillment_statuses": [
    "string"
  ],
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z",
  "checkout_on": "2019-08-24T14:15:22Z",
  "pending_on": "2019-08-24T14:15:22Z",
  "closed_on": "2019-08-24T14:15:22Z",
  "shipped_on": "2019-08-24T14:15:22Z",
  "_embedded": {
    "contact": {
      "id": 0,
      "name": "string",
      "email": "string",
      "phone_number": "string"
    },
    "company": {
      "id": 0,
      "name": "string",
      "id_number": "string",
      "activity_code": "string",
      "address": {
        "street": "string",
        "street_2": "string",
        "locality_name": "string",
        "region_name": "string",
        "country_name": "string",
        "postal_code": "string"
      }
    },
    "address": {
      "street": "string",
      "street_2": "string",
      "locality_name": "string",
      "region_name": "string",
      "country_name": "string",
      "postal_code": "string"
    },
    "billing_address": {
      "street": "string",
      "street_2": "string",
      "locality_name": "string",
      "region_name": "string",
      "country_name": "string",
      "postal_code": "string"
    },
    "line_items": [
      {
        "id": 0,
        "product_id": 0,
        "product_name": "string",
        "variant_id": 0,
        "variant_name": "string",
        "variant_sku": "string",
        "units": 0,
        "unit_price": 0,
        "net_total": 0,
        "total": 0
      }
    ],
    "payments": [
      {
        "id": 0,
        "order_id": 0,
        "amount": 0,
        "absolute_amount": 0,
        "successful": true,
        "card_token_id": 0,
        "payment_method_type": "string",
        "transaction_id": "string",
        "authorization_code": "string",
        "description": "string",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "refunds": [
      {
        "id": 0,
        "order_id": 0,
        "amount": 0,
        "absolute_amount": 0,
        "successful": true,
        "card_token_id": 0,
        "payment_method_type": "string",
        "transaction_id": "string",
        "authorization_code": "string",
        "description": "string",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "documents": [
      {
        "id": 0,
        "document_type": "invoice",
        "document_number": "string",
        "file_url": "string"
      }
    ]
  }
}
```
