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

Partially update a product stock

Updates one or more fields of a product-stock record. Only the fields included in the request body are changed; everything left out keeps its current value.

The product cannot be changed: including a product that differs from the record's current one is rejected with 406 Not Acceptable.

patch
/product_stock/{id}/
Authorizations
AuthorizationstringRequired

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

Path parameters
idintegerRequired

The unique identifier of the product-stock record.

Body

The body of a product-stock partial update request. Only the fields included in the body are changed; every field is optional.

productintegerOptional

Including a product that differs from the record's current one is rejected. Omitting it keeps the current product.

stockintegerOptional

The sellable quantity. Reconciled against sold_quantity_unreported on write.

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 reported.

Responses
200

The updated 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.

patch/product_stock/{id}/
PATCH /api/v1/remote/1/product_stock/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 12

{
  "stock": 30
}
{
  "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?