Skip to main content
POST
Create stock (positive adjustment)

Request Structure

Key Fields

Storage Units

Each line’s storage unit fields decide how it is created: Send the same storage_unit_reference on several lines to build a mixed storage unit.

Behavior

  • All lines are created in a single transaction: if any line fails, nothing is created.
  • New stock is always created with status AVAILABLE.
  • Products with full serial number tracking need one serial number per unit, and cannot use storage_unit_quantity greater than 1.
  • The response has no body (204). To read the created stock, query /graphql#ListStocks (for example filtered by location and product).

Error Codes

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json

Request body for creating new stock through a positive adjustment. The body is sent as plain JSON, not wrapped in a JSON:API data envelope.

account_id
integer
required

Stock account that owns all the stock created by this request

Example:

1

description
string
required

Free-text reason for the adjustment, recorded on each transaction

stock_date
string<date-time>
required

ISO 8601 date-time used as the FIFO date of every stock line created (e.g. 2026-10-17T09:30:00Z)

stocks
object[]
required

The stock lines to create. Each line is created as loose stock, on one storage unit, or on several storage units depending on its storage unit fields.

Minimum array length: 1
warehouse_id
integer
required

Warehouse all the stock is created in

Example:

1

reason_code_id
integer | null

ID of a reason code with reason_type positive_adjustment, recorded on the transaction for the audit trail. Required when the stock's account has enforce_positive_adjustment_reason_code enabled.

Response

Stock created successfully