POST
/
api
/
claims
/
from-pane
Create claim from pane number
curl --request POST \
  --url http://localhost:3000/api/claims/from-pane \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paneNumber": "PNE-0001",
  "description": "<string>",
  "reportedBy": "<string>",
  "defectStation": "<string>",
  "approvedBy": "<string>",
  "remadePane": "<string>",
  "photos": [
    "<string>"
  ],
  "claimDate": "2023-11-07T05:31:56Z"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "claimNumber": "CLM-0001",
    "order": "<string>",
    "pane": "<string>",
    "material": "<string>",
    "description": "<string>",
    "defectStation": "<string>",
    "reportedBy": "<string>",
    "status": "pending",
    "approvedBy": "<string>",
    "remadePane": "<string>",
    "photos": [],
    "claimDate": "2023-11-07T05:31:56Z",
    "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.

Body

application/json
paneNumber
string
required

Pane number (e.g. PNE-0001). The endpoint auto-resolves the order and material from the pane.

Minimum string length: 1
Example:

"PNE-0001"

source
enum<string>
required
Available options:
customer,
worker
description
string
required
Minimum string length: 1
reportedBy
string
required
Minimum string length: 1
defectCode
enum<string>
Available options:
broken,
chipped,
dimension_wrong,
scratch,
stain,
other
defectStation
string

Station ObjectId where defect was found

status
enum<string>
Available options:
pending,
approved,
rejected
decision
enum<string>
Available options:
destroy,
keep
approvedBy
string
Minimum string length: 1
remadePane
string
Minimum string length: 1
photos
string<uri>[]
claimDate
string<date-time>

Response

Claim created

success
boolean
Example:

true

message
string
data
object