API referenceStock
Create Stock Event
Pin an alert on a stock item. Use this for speeding, tamper, SOS, geofence, or any other event from a GPS tracker. Coordinates are optional; when they are omitted, Lockii uses the item's latest tracker fix. Send the same event again and it updates the pin instead of duplicating it.
App connections need the inventory:write scope.
POST
/stock/{stockId}/eventscurl -X POST "https://dash.lockii.app/api/v1/stock/{stockId}/events" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "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
stockIdstringpathrequiredStock item id.
Body
application/json
descriptionstringlatnumberlngnumbermetadatamap of any ofoccurredAtintegerseverityenum<string>One of:infowarningcriticaltitlestringtypestringrequiredorderIDstring
Response
application/json
JSON result for this operation.
eventobjectrequired
{
"event": {
"id": "string",
"occurredAt": 0,
"severity": "info",
"title": "string",
"type": "string"
}
}