API referenceStock
Create Stock
Create a stock row for a product at a location. The new item gets the same parts as the other stock of that product. App connections need the inventory:write scope.
POST
/stockcurl -X POST "https://dash.lockii.app/api/v1/stock" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "string",
"productID": "string",
"locationID": "string",
"stockID": "string"
}'Authorization
x-api-keystringheaderAPI key from Settings → Integrations → API.
AuthorizationstringheaderThe same API key, or an OAuth access token, sent as Authorization: Bearer.
api_keystringqueryAPI key query parameter.
Body
application/json
idstringrequiredStock row ID, usually stock_<uuid>
productIDstringrequiredProduct ID this stock belongs to
locationIDstringrequiredLocation ID where this stock is held
stockIDstringrequiredHuman-readable stock label/identifier
lockIDstring | nullcompanyIDstringCompany ID. Defaults to the authenticated user's company.
trackerIDstring | nullarchivedbooleanDefault:false
Response
application/json
JSON result for this operation.
object
{}