POST
/
api
/
requests
Create a request
curl --request POST \
  --url http://localhost:3000/api/requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "details": {
    "type": "<string>",
    "quantity": 2,
    "estimatedPrice": 1
  },
  "customer": "<string>",
  "deadline": "2023-11-07T05:31:56Z",
  "deliveryLocation": "<string>",
  "assignedTo": "<string>",
  "expectedDeliveryDate": "2023-11-07T05:31:56Z",
  "panes": [
    {
      "currentStation": "<string>",
      "routing": [
        "<string>"
      ],
      "customRouting": true,
      "dimensions": {
        "width": 1,
        "height": 1,
        "thickness": 1
      },
      "jobType": "<string>",
      "rawGlass": {
        "glassType": "<string>",
        "color": "<string>",
        "thickness": 1,
        "sheetsPerPane": 2
      },
      "glassType": "<string>",
      "glassTypeLabel": "<string>",
      "holes": [
        {
          "id": "<string>",
          "x": 123,
          "y": 123,
          "diameter": 123,
          "width": 123,
          "height": 123,
          "length": 123,
          "vertices": [
            {
              "x": 123,
              "y": 123
            }
          ]
        }
      ],
      "notches": [
        {
          "id": "<string>",
          "x": 123,
          "y": 123,
          "diameter": 123,
          "width": 123,
          "height": 123,
          "length": 123,
          "vertices": [
            {
              "x": 123,
              "y": 123
            }
          ]
        }
      ],
      "cornerSpec": "<string>",
      "dimensionTolerance": "<string>",
      "processes": [
        "<string>"
      ],
      "edgeTasks": [
        {
          "side": "<string>",
          "edgeProfile": "<string>",
          "machineType": "<string>",
          "status": "pending"
        }
      ],
      "material": "<string>",
      "notes": "<string>"
    }
  ]
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "requestNumber": "REQ-0001",
    "details": {
      "type": "<string>",
      "estimatedPrice": 123,
      "quantity": 2
    },
    "customer": "<string>",
    "deadline": "2023-11-07T05:31:56Z",
    "deliveryLocation": "<string>",
    "assignedTo": "<string>",
    "expectedDeliveryDate": "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
details
object
required
customer
string
required
Minimum string length: 1
deadline
string<date-time>
deliveryLocation
string
assignedTo
string
Minimum string length: 1
expectedDeliveryDate
string<date-time>
panes
object[]

Optional array of panes to create alongside the request

Response

Request created

success
boolean
Example:

true

message
string
data
object