PATCH
/
api
/
production-logs
/
{id}
Update a production log
curl --request PATCH \
  --url http://localhost:3000/api/production-logs/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pane": "<string>",
  "order": "<string>",
  "station": "<string>",
  "operator": "<string>",
  "defectCode": "<string>",
  "reworkReason": "<string>",
  "qcResults": [
    {
      "label": "<string>",
      "passed": true,
      "note": "<string>"
    }
  ],
  "startedAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z",
  "durationMs": 1
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "pane": "<string>",
    "order": "<string>",
    "station": "<string>",
    "operator": "<string>",
    "defectCode": "<string>",
    "reworkReason": "<string>",
    "qcResults": [
      {
        "label": "<string>",
        "passed": true,
        "note": "<string>"
      }
    ],
    "startedAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "durationMs": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Resource ID

Body

application/json
pane
string
Minimum string length: 1
order
string
Minimum string length: 1
station
string

Station ObjectId

Minimum string length: 1
action
enum<string>
Available options:
scan_in,
start,
complete,
fail,
rework,
qc_pass,
qc_fail,
batch_start,
batch_complete
operator
string
Minimum string length: 1
defectCode
string
reworkReason
string
qcResults
object[]
status
enum<string>
Available options:
pass,
fail,
rework
startedAt
string<date-time>
completedAt
string<date-time>
durationMs
number
Required range: x >= 0

Response

Production log updated

success
boolean
Example:

true

message
string
data
object