PATCH
/
api
/
requests
/
{id}
Update a request
curl --request PATCH \
  --url http://localhost:3000/api/requests/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "details": {
    "type": "<string>",
    "estimatedPrice": 1,
    "quantity": 2
  },
  "customer": "<string>",
  "deadline": "2023-11-07T05:31:56Z",
  "deliveryLocation": "<string>",
  "assignedTo": "<string>",
  "expectedDeliveryDate": "2023-11-07T05:31:56Z"
}
'
{
  "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.

Path Parameters

id
string
required

Resource ID

Body

application/json
details
object
customer
string
Minimum string length: 1
deadline
string<date-time>
deliveryLocation
string
assignedTo
string
Minimum string length: 1
expectedDeliveryDate
string<date-time>

Response

Request updated

success
boolean
Example:

true

message
string
data
object