Open Inventory / Docs
EndpointsStockResourcesIdStockUnits

Create one or more individually identified stock units

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

POST
/resources/{id}/stock/units

Authorization

bearerAuth
headerAuthorizationBearer <inv_ token>

Path Parameters

id*string
Formatuuid

Header Parameters

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Request Body

application/json
  1. body
count?integer
Range1 <= value <= 100
Default1
code?string
Lengthlength <= 180
codes?array<>
Itemsitems <= 100
location?|
Lengthlength <= 240
locationResourceId?|
Formatuuid
metadata?
customFields?

Values keyed by stable custom-field definition keys. Types and required values are checked against active definitions applicable to the resource.

Propertiesproperties <= 100
acquiredAt?string
Formatdate-time
totalPriceCents?|
Range0 <= value <= 2000000000
priceCurrency?|
Length3 <= length <= 3

Response Body

Units created with audit entries

Example Request
curl -X POST 'https://inventory.example.com/api/v1/resources/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock/units' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty