Skip to main content

Seal commands

5 operations at https://api.zaitrack.app. Request and response bodies are JSON with camelCase keys; ids are UUIDs; times are RFC 3339 in UTC.

Every operation needs an API key, a personal access token or an OAuth access token unless it says otherwise. An Idempotency-Key is replayed for 24 hours; see Idempotency. Errors are application/problem+json; see Errors.

List electronic seal commands​

GET /v1/seal-commands

  • Scope: commands:read or commands:*
  • Rate class: read (100 per second and 360,000 per hour)
  • Idempotency-Key: not used
  • Audited: no
  • Step-up MFA: no
Query parameterTypeNotes
deviceIdstring
vehicleIdstring
limitstring
statestring

Request​

No body.

Response​

200: fields the handler writes, taken from its source.

Keys: items. Their types are not described.

Example​

curl "https://api.zaitrack.app/v1/seal-commands" \
-H "Authorization: Bearer zk_test_…"

A seal command with its events​

GET /v1/seal-commands/{id}

  • Scope: commands:read or commands:*
  • Rate class: read (100 per second and 360,000 per hour)
  • Idempotency-Key: not used
  • Audited: no
  • Step-up MFA: no

Path parameters: id.

Request​

No body.

Response​

200: not described. The service's OpenAPI document has no schema for this response, and the handler's could not be read from its source.

Example​

curl "https://api.zaitrack.app/v1/seal-commands/$ID" \
-H "Authorization: Bearer zk_test_…"

Approve a pending seal command​

POST /v1/seal-commands/{id}:approve

  • Scope: commands:approve or commands:*
  • Rate class: command (20 per second and 360,000 per hour)
  • Idempotency-Key: optional
  • Audited: high risk
  • Step-up MFA: required (an OAuth session with a recent WebAuthn step-up; API keys never qualify)

Path parameters: id.

Request​

Fields the handler reads, taken from its source. One handler serves several actions here, so a field may not apply to this one.

FieldTypeNotes
notestring

Response​

200: not described. The service's OpenAPI document has no schema for this response, and the handler's could not be read from its source.

Example​

Every field is sent with a placeholder value: replace them with yours.

Set STEP_UP_ACCESS_TOKEN to an OAuth session access token with a recent WebAuthn step-up. An API key or personal access token does not satisfy this requirement.

curl -X POST "https://api.zaitrack.app/v1/seal-commands/$ID:approve" \
-H "Authorization: Bearer $STEP_UP_ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"note": "…"}'

Deny a pending seal command​

POST /v1/seal-commands/{id}:deny

  • Scope: commands:approve or commands:*
  • Rate class: command (20 per second and 360,000 per hour)
  • Idempotency-Key: optional
  • Audited: medium risk
  • Step-up MFA: no

Path parameters: id.

Request​

Fields the handler reads, taken from its source. One handler serves several actions here, so a field may not apply to this one.

The same fields as the request of Approve a pending seal command.

Response​

200: not described. The service's OpenAPI document has no schema for this response, and the handler's could not be read from its source.

Example​

Every field is sent with a placeholder value: replace them with yours.

curl -X POST "https://api.zaitrack.app/v1/seal-commands/$ID:deny" \
-H "Authorization: Bearer zk_test_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"note": "…"}'

Cancel a seal command not yet sent​

POST /v1/seal-commands/{id}:cancel

  • Scope: commands:write or commands:*
  • Rate class: command (20 per second and 360,000 per hour)
  • Idempotency-Key: optional
  • Audited: low risk
  • Step-up MFA: no

Path parameters: id.

Request​

Fields the handler reads, taken from its source. One handler serves several actions here, so a field may not apply to this one.

The same fields as the request of Approve a pending seal command.

Response​

200: not described. The service's OpenAPI document has no schema for this response, and the handler's could not be read from its source.

Example​

Every field is sent with a placeholder value: replace them with yours.

curl -X POST "https://api.zaitrack.app/v1/seal-commands/$ID:cancel" \
-H "Authorization: Bearer zk_test_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"note": "…"}'