Skip to main content
POST
/
inventory
Create a finished-goods record manually
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/inventory \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_sku_id": "<string>",
  "ready_stock": 0,
  "low_stock_threshold": 5,
  "image_url": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "product_sku_id": "<string>",
    "sku": "<string>",
    "color": "<string>",
    "material": "<string>",
    "ready_stock": 123,
    "low_stock_threshold": 123,
    "status": "<string>",
    "image_url": "<string>",
    "is_active": true,
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Body

application/json
product_sku_id
string
required

Product SKU id this finished-good record belongs to.

ready_stock
integer
default:0

Starting on-hand stock (non-negative integer).

Required range: x >= 0
low_stock_threshold
integer
default:5

Alert when ready_stock falls at or below this value (non-negative integer).

Required range: x >= 0
image_url
string<uri> | null

Optional public image URL for the inventory item.

Response

Inventory item created

success
enum<boolean>
required
Available options:
true
data
object
required