Skip to main content
PATCH
/
commissions
/
v2
/
rs
/
{commissionId}
Update an existing commission
curl --request PATCH \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/commissions/v2/rs/{commissionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "visitType": 1,
  "decision": 1,
  "commissionDate": "2024-12-01T12:34:56.000Z",
  "comment": "Urgent repairs needed.",
  "labelIds": [
    1
  ],
  "siteIds": [
    1
  ],
  "buildingworkIds": [
    1
  ]
}
'
{
  "data": {
    "id": 1,
    "visitType": 1,
    "commissionType": 1,
    "status": 1,
    "decision": 1,
    "commissionDate": "2024-12-01T12:34:56.000Z",
    "buildingWorkId": 1,
    "comment": "Urgent repairs needed.",
    "signatureUrl": "Signature URL",
    "signedBy": "Signatory",
    "signedDate": "2024-12-01T12:34:56.000Z",
    "archivedAt": "2024-12-31T23:59:59.000Z",
    "deletedAt": "2024-11-30T10:15:30.000Z",
    "updatedAt": "2024-12-09T14:23:00.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z",
    "createdByUserId": 1
  }
}

Authorizations

Authorization
string
header
required

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

Headers

content-type
string
required

Content type, must be "application/json".

Allowed value: "application/json"
x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

commissionId
integer
required

Unique identifier of the commission.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

Body

application/json

Details required to update a commission

visitType
enum<number>

Type of visit.

Available options:
0,
1,
2,
3
Example:

1

decision
enum<number>

Decision of the commission.

Available options:
0,
1,
2,
3
Example:

1

commissionDate

Date of the commission.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-12-01T12:34:56.000Z"

comment
string | null

Comment associated with the commission.

Example:

"Urgent repairs needed."

labelIds
integer[]

Unique identifier of the label.

Required range: -9007199254740991 <= x <= 9007199254740991
siteIds
integer[]
Minimum array length: 1

Unique identifier of the site.

Required range: -9007199254740991 <= x <= 9007199254740991
buildingworkIds
integer[]

Identifier of the associated building work.

Required range: -9007199254740991 <= x <= 9007199254740991

Response

200 - application/json

The commission has been updated successfully

data
object
required