POST
/api/public/v1/qa-corrective-actionsOpen or update a corrective action
Opens an action, or updates one by passing its `id`. Setting `status` to CLOSED stamps `resolvedAt`; reopening clears it, so the resolution date always belongs to the closure that is current. Link it to the `checkId` that triggered it where there is one — that link is what lets the historical report tie a failure mode back to the measurements behind it.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
quality:actions:write
Request Body
| Property | Type | Description |
|---|---|---|
locationId | string | The plant. |
id | string | Pass an existing id to update rather than open a new one. |
issue | string | What went wrong. |
suspectedCause | string | |
actionTaken | string | |
checkId | string | The check that triggered it. |
shiftSessionId | string | The shift it happened on. |
ownerEmployeeId | string | Who is seeing it through. |
category | string | The failure mode. Defaults to OTHER. |
status | string | CLOSED stamps `resolvedAt`. |
resolutionNotes | string |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/qa-corrective-actions" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"locationId": "loc_abc123",
"checkId": "qck_5522",
"issue": "Bags running 1 lb heavy after the hopper refill.",
"suspectedCause": "Auger calibration drifted.",
"category": "EQUIPMENT"
}'200Example response
json
{
"message": "Corrective action opened!",
"content": {
"action": {
"id": "qca_7710",
"locationId": "loc_abc123",
"shiftSessionId": "qss_3300",
"checkId": "qck_5522",
"issue": "Bags running 1 lb heavy after the hopper refill.",
"suspectedCause": "Auger calibration drifted.",
"actionTaken": "Recalibrated and re-ran three checks.",
"ownerEmployeeId": "emp_12ab",
"category": "EQUIPMENT",
"status": "CLOSED",
"openedAt": "2026-08-29T14:20:00.000Z",
"resolvedAt": "2026-08-29T15:02:00.000Z",
"resolutionNotes": "Back in band."
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Quality → Corrective Actions
/quality/corrective-actions- Open Corrective Actions.
- Log one, or close an open one out.