API referenceStock Part
Set Part Next Due
Set how much is left until a stock part's next check. Pass remaining, not last-check dates. Example: next due in 3000km, 10 bookings, or 14 days. Use the same nextDue shape list_stock_parts returns. App connections need the inventory:write scope.
POST
/stock-part/{id}/next-duecurl -X POST "https://dash.lockii.app/api/v1/stock-part/{id}/next-due" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"nextDue": [
{
"remaining": 0,
"type": "booked_hours"
}
]
}'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.
Parameters
idstringpathrequiredStock part ID from list_stock_parts
Body
application/json
nextDueobject[]requiredreadingsmap of __schema0Current meter readings to snapshot against, e.g. { distance_km: 45000 }. Live GPS and stock readings are used automatically if omitted.
Response
application/json
JSON result for this operation.
object
{}