PATCH
/
api
/
orders
/
{id}
Update an order
curl --request PATCH \
  --url http://localhost:3000/api/orders/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "request": "<string>",
  "priority": 1,
  "customer": "<string>",
  "material": "<string>",
  "quantity": 2,
  "stations": [
    "<string>"
  ],
  "currentStationIndex": 1,
  "stationHistory": [
    {
      "station": "<string>",
      "enteredAt": "2023-11-07T05:31:56Z",
      "exitedAt": "2023-11-07T05:31:56Z",
      "completedBy": "<string>"
    }
  ],
  "stationData": {},
  "paneCount": 1,
  "panesCompleted": 1,
  "progressPercent": 50,
  "stationBreakdown": {},
  "notes": "<string>",
  "claim": "<string>",
  "withdrawal": "<string>",
  "assignedTo": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "orderNumber": "ORD-0001",
    "request": "<string>",
    "priority": 123,
    "customer": "<string>",
    "material": "<string>",
    "quantity": 2,
    "stations": [
      "<string>"
    ],
    "currentStationIndex": 1,
    "stationHistory": [
      {
        "station": "<string>",
        "enteredAt": "2023-11-07T05:31:56Z",
        "exitedAt": "2023-11-07T05:31:56Z",
        "completedBy": "<string>"
      }
    ],
    "stationData": {},
    "paneCount": 0,
    "panesCompleted": 0,
    "progressPercent": 0,
    "stationBreakdown": {},
    "notes": "<string>",
    "claim": "<string>",
    "withdrawal": "<string>",
    "assignedTo": "<string>",
    "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
request
string
Minimum string length: 1
priority
number
Required range: x >= 0
customer
string
Minimum string length: 1
material
string
Minimum string length: 1
quantity
integer
Required range: x >= 1
stations
string[]

Array of Station ObjectIds

Minimum string length: 1
currentStationIndex
integer
Required range: x >= 0
stationHistory
object[]
stationData
object
paneCount
integer

Total number of panes in this order

Required range: x >= 0
panesCompleted
integer

Number of panes completed

Required range: x >= 0
progressPercent
number

Overall completion percentage

Required range: 0 <= x <= 100
stationBreakdown
object

Pane count per station

notes
string
status
enum<string>
Available options:
pending,
in_progress,
completed,
cancelled
claim
string
Minimum string length: 1
withdrawal
string
Minimum string length: 1
assignedTo
string
Minimum string length: 1

Response

Order updated

success
boolean
Example:

true

message
string
data
object