POST
/api/public/v1/qa-corrective-actions

Open 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

PropertyTypeDescription
locationIdstringThe plant.
idstringPass an existing id to update rather than open a new one.
issuestringWhat went wrong.
suspectedCausestring
actionTakenstring
checkIdstringThe check that triggered it.
shiftSessionIdstringThe shift it happened on.
ownerEmployeeIdstringWho is seeing it through.
categorystringThe failure mode. Defaults to OTHER.
statusstringCLOSED stamps `resolvedAt`.
resolutionNotesstring
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
  1. Open Corrective Actions.
  2. Log one, or close an open one out.