Attach Part
Attach an existing part definition to one or more stock items. Attaching it to any stock item also adds it to every other stock item of that product. When an item is already in use, pass nextDue as remaining until the next check. Current meter readings are loaded per item; pass readings only when attaching one item and they told you the current odometer. App connections need the booking:write or inventory:write scope.
curl -X POST "https://dash.lockii.app/api/v1/maintenance-part/{scheduleID}/attach" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stockIDs": [
"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.
Parameters
scheduleIDstringpathrequiredPart/schedule ID to attach
Body
nextDueobject[]Remaining until the next check for each interval rule. Prefer this over last-check dates. Omit only when the item is unused or just serviced. If they give a current odometer, pass it in readings first.
readingsmap of __schema0Current meter readings to snapshot against, e.g. { distance_km: 45000 }. Live GPS and stock readings are used automatically if omitted.
stockIDsstring[]requiredStock item IDs to attach the part to
Response
JSON result for this operation.
{}