Thing .correct
POST /{namespace}/things/{thing}/correct
Correct fixes one field of a record that was wrong when served, keeps the value it replaced and tells every Customer who read it.
- Noun
- Thing
- Mode
do- Event
Thing.corrected
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
thing | Thing | required | The record. |
field | string | required | The field that was wrong. |
value | string | required | The right value. |
reason | text | required | Why it was wrong. |
evidence | url | required | The Source that shows the right value. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
thing | Thing | required | The corrected record. |
Effects
| Fact | Value |
|---|---|
| Action class | None: no approval rule names it, so it runs within its seat's Permissions and Limits |
| Stakes | The Startup's own records only |
| Door | Two-way: it runs at once |
| Modes | try previews it and stores nothing; send returns a pending Action; do (default) waits for the result |
| Idempotent | Only with a key: a repeat with the same Idempotency-Key and input returns the first Action, the same key with other input is refused with 409, and a repeat without a key runs again |
| Undo | Action.undo reverses it |
| Emits | Thing.corrected |
| Performed by | The Data Engineer |
- Each Customer that read the wrong value gets
Thing.correctedin its change feed and webhooks.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
thing is missing, or is not a thing | invalid-input | Send thing as a thing, then call it again. | None. |
field is missing, or is not a string | invalid-input | Send field as a string, then call it again. | None. |
value is missing, or is not a string | invalid-input | Send value as a string, then call it again. | None. |
reason is missing, or is not a text | invalid-input | Send reason as a text, then call it again. | None. |
evidence is missing, or is not a url | invalid-input | Send evidence as a url, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, no delay window |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval, which a Human answers: the owner of record, or a Human they named to approve for the Founder seat. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |
To retry, send the same Idempotency-Key: the retry returns the first Action and runs nothing twice. A new key runs the call again.