Skip to main content
POST
/
purchase-orders
/
{id}
/
items
Add a line item to a purchase order
curl --request POST \
  --url https://api.arcuserp.com/v1/purchase-orders/{id}/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quantity": 1.0001,
  "variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "unit_cost": 123,
  "purchase_policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sort_order": 123
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sku": "<string>",
  "title": "<string>",
  "quantity": 123,
  "quantity_fulfilled": 123,
  "quantity_returned": 123,
  "sell_rate": 123,
  "list_price": 123,
  "discount_amount": 123,
  "line_subtotal": 123,
  "tax_amount": 123,
  "line_total": 123,
  "unit_cost": 123,
  "weight": 123,
  "is_tax_exempt": true,
  "product_tax_code": "<string>",
  "sort_order": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.arcuserp.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.

Headers

Idempotency-Key
string

Optional idempotency key for safe retries (Stripe-style).

Maximum string length: 255

Path Parameters

id
string<uuid>
required

Body

application/json
product_id
string<uuid>
required

The product (SKU) to add. Cannot be a kit. If the product has variants, variant_id is also required.

quantity
number
required

Quantity ordered. Must be positive.

Required range: x >= 0.0001
variant_id
string<uuid> | null

Optional variant of product_id.

unit_cost
number | null

Optional unit cost override. Omit to auto-apply best purchase-pricing policy.

purchase_policy_id
string<uuid> | null

Optional pricing policy id to lock against (for audit trail).

sort_order
integer | null

Optional sort order on the PO; defaults to 0.

Response

Line item added (or merged into existing line of same product+variant).

A line item on an order. Sub-resource of Order.

id
string<uuid>
order_id
string<uuid>
product_id
string<uuid> | null
variant_id
string<uuid> | null
sku
string | null
title
string
quantity
integer
quantity_fulfilled
integer
read-only
quantity_returned
integer
read-only
sell_rate
number
list_price
number
discount_amount
number
line_subtotal
number
read-only
tax_amount
number
read-only
line_total
number
read-only
unit_cost
number | null
weight
number | null
is_tax_exempt
boolean
product_tax_code
string | null
sort_order
integer
created_at
string<date-time>
read-only
updated_at
string<date-time>
read-only