Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a product stock

Creates a stock record for a product.

product is required, and because a product may have only one stock record, a product that already has one is rejected. stock defaults to 0 and unit_type to qty when omitted. The identifier is assigned by the server; a pk sent in the request body is ignored.

When the LIST_SIMPLE_INSTEAD_OF_META dynamic setting is enabled and the product is a simple type, the product's listable status is recomputed after the stock is saved (see the section description).

post
/product_stock/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

The body of a product-stock create or full update request.

productintegerRequired

The identifier of the product this stock belongs to. Required on create. On update it must match the record's current product — a different value is rejected.

stockintegerOptional

The sellable quantity. A non-negative integer. Reconciled against sold_quantity_unreported on write.

Default: 0
unit_typestring · enumOptional

The unit of measure of a stock quantity.

Possible values:
extra_fieldobjectOptional

Free-form JSON for extra data. Optional.

sold_quantity_unreportedintegerOptional

The quantity sold locally but not yet reported. Optional; normally managed internally.

Responses
201

The created product-stock record.

application/json

A product-stock record — the primary on-hand quantity of a single product.

pkintegerRead-onlyOptional

The unique identifier of the record.

productintegerOptional

The identifier of the product this stock belongs to. One record per product.

stockintegerOptional

The sellable quantity. A non-negative integer.

unit_typestring · enumOptional

The unit of measure of a stock quantity.

Possible values:
extra_fieldobjectOptional

Free-form JSON for extra data.

sold_quantity_unreportedintegerOptional

The quantity sold locally but not yet reflected in the externally reported stock.

modified_datestring · date-timeRead-onlyOptional

ISO 8601 timestamp of the last modification.

post/product_stock/
POST /api/v1/remote/1/product_stock/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "product": 3391,
  "stock": 24,
  "unit_type": "qty"
}
{
  "pk": 512,
  "product": 3391,
  "stock": 24,
  "unit_type": "qty",
  "extra_field": {},
  "sold_quantity_unreported": 0,
  "modified_date": "2026-08-21T10:15:30Z"
}

Last updated

Was this helpful?