---
title: "Create purchase orders"
method: POST
path: "/api/v1/sa/inventory/purchase-orders"
tags: ["Purchase Orders"]
---

# Create purchase orders

`POST /api/v1/sa/inventory/purchase-orders`

## 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`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

A new order is always a draft, and the items arrive through the items endpoint. The plan must carry the purchase orders, and the team must have one left of its quota for every order of the call: without either the call answers 422. The body is one order or an array of them.

## Request body

- union
  - PurchaseOrderCreateForm: A new order is a draft of one supplier. The create reads the supplier alone; the other fields of the order go with the PATCH.
    - `supplier_id` integer, required
  - PurchaseOrderCreateForm[]
    - `supplier_id` integer, required

## Response `200`

One result for each element. An array answers this shape.

- object
  - `data` PurchaseOrder[]
    - `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
  - `meta` ApiV1BatchMeta: The count of a write that took an array.
    - `succeeded` integer
    - `failed` integer
  - `errors` ApiV1BatchError[]
    - `code` string
    - `message` string

## Other responses

- `201`: The purchase order
- `400`: Bad request - validation failed or invalid parameters
- `402`: Payment Required - subscription expired or payment method required
- `403`: Access denied - insufficient permissions, invalid API key, or the API request limit is used up (`public_api_key_limit`)
- `404`: Resource not found
- `409`: Conflict - the row is there, and another row already holds the place the call asks for
- `422`: Business logic error - operation cannot be completed due to business rules
- `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)
