---
title: "Add order items"
method: POST
path: "/api/v1/sa/inventory/purchase-orders/{id}/items"
tags: ["Purchase Orders"]
---

# Add order items

`POST /api/v1/sa/inventory/purchase-orders/{id}/items`

## Request

- Base URL: `https://app.sellerassistant.app` (the document declares no server; this is the origin it was published from)
- URL: `https://app.sellerassistant.app/api/v1/sa/inventory/purchase-orders/{id}/items`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

The body is one item, an array of items, or an object with `items`. The answer is the order, because the totals and the item count change with every item added. An item with an ASIN goes to the profit calculation. An item that names `internal_product_id` reads the title, the picture and the ASIN from that product, and a field the body sends stays as the body sends it.

## Path parameters

- `id` integer, required

## Request body

- union
  - PurchaseOrderItemForm: One line to add. A line names the product by internal_product_id, or by the identifiers the order can match.
    - `internal_product_id` string, nullable: The inventory product the line points at. The call answers 404 when the product is not of the team.
    - `asin` string, nullable
    - `upc` string, nullable
    - `ean` string, nullable
    - `identifier` string, nullable: The key the order matches a line by first. A line whose identifier the order holds adds to that line.
    - `sku` string, nullable
    - `supplier_sku` string, nullable: The code of the product at the supplier.
    - `title` string, nullable
    - `brand` string, nullable
    - `image_url` string, nullable
    - `unit_cost` number, nullable
    - `unit_count` integer, nullable: A line with no count takes 1.
  - PurchaseOrderItemForm[]
    - `internal_product_id` string, nullable: The inventory product the line points at. The call answers 404 when the product is not of the team.
    - `asin` string, nullable
    - `upc` string, nullable
    - `ean` string, nullable
    - `identifier` string, nullable: The key the order matches a line by first. A line whose identifier the order holds adds to that line.
    - `sku` string, nullable
    - `supplier_sku` string, nullable: The code of the product at the supplier.
    - `title` string, nullable
    - `brand` string, nullable
    - `image_url` string, nullable
    - `unit_cost` number, nullable
    - `unit_count` integer, nullable: A line with no count takes 1.
  - object
    - `items` PurchaseOrderItemForm[], required
      - `internal_product_id` string, nullable: The inventory product the line points at. The call answers 404 when the product is not of the team.
      - `asin` string, nullable
      - `upc` string, nullable
      - `ean` string, nullable
      - `identifier` string, nullable: The key the order matches a line by first. A line whose identifier the order holds adds to that line.
      - `sku` string, nullable
      - `supplier_sku` string, nullable: The code of the product at the supplier.
      - `title` string, nullable
      - `brand` string, nullable
      - `image_url` string, nullable
      - `unit_cost` number, nullable
      - `unit_count` integer, nullable: A line with no count takes 1.

## Response `201`

The purchase order, with the new totals

- object
  - `data` PurchaseOrder: What the team bought from one supplier. A purchase order has no team of its own: the supplier carries it.
    - `id` integer: The id of the purchase order.
    - `po_id` string, nullable: The name a person gave the order.
    - `status` string, nullable
    - `supplier_id` integer
    - `marketplace_id` string, nullable
    - `prep_center_id` integer, nullable: The warehouse the goods go to.
    - `user_id` integer, nullable
    - `order_date` string, date, nullable
    - `currency` string, nullable: The currency of the supplier.
    - `items_count` integer
    - `subtotal` number, float, nullable: The sum of the items. Null means not known, which is not the same as zero.
    - `shipping_cost` number, float, nullable
    - `taxes` number, float, nullable
    - `misc_expenses` number, float, nullable
    - `total_price` number, float, nullable
    - `estimated_revenue` number, float, nullable
    - `estimated_profit` number, float, nullable
    - `supplier` object: The supplier of the order. Every answer of the v1 carries it.
      - `id` integer: The id of the document.
      - `name` string
      - `currency` string, nullable
    - `items` PurchaseOrderItem[]: The items of the order. It is present only with `include=items`, and it carries the first 100 items, by id. `items_count` reports the real number, and `/purchase-orders/{id}/items` serves them all as a page.
      - `id` integer
      - `purchase_order_id` integer
      - `internal_product_id` string, nullable: The inventory product the line points at. It is the same id the matches and the history of a product use.
      - `title` string, nullable
      - `image_url` string, nullable
      - `asin` string, nullable
      - `upc` string, nullable
      - `ean` string, nullable
      - `sku` string, nullable
      - `identifier` string, nullable
      - `unit_cost` number, float, nullable: Null means not known, which is not the same as zero.
      - `unit_count` integer
      - `total_cost` number, float, nullable
      - `selling_price` number, float, nullable
      - `profit_fba` number, float, nullable
      - `profit_marketplace_id` string, nullable
      - `profit_calculated_at` string, date-time, nullable
      - `created_at` string, date-time, nullable
      - `updated_at` string, date-time, nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable

## Other responses

- `400`: Bad request - validation failed or invalid parameters
- `403`: Access denied - insufficient permissions, invalid API key, or the API request limit is used up (`public_api_key_limit`)
- `404`: Resource not found
- `429`: Too many requests - rate limit exceeded

---

[API](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api.md) · [All operations](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/revisions/5b3ecdbcadb6?raw)
