Skip to main content
POST
/
commissions
/
v1
Create a new commission
curl --request POST \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/commissions/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>' \
  --data '
{
  "siteId": 123,
  "visitType": 1,
  "decision": 1,
  "buildingWork": {
    "authorizationNumber": "AUTH123",
    "description": "Rebuilding the main entrance."
  },
  "commissionDate": "2024-12-01T12:34:56.000Z",
  "buildingWorkId": 456,
  "comment": "This commission is for urgent repairs."
}
'
{
  "data": {
    "buildingWorkId": 123,
    "commissionDate": "2024-12-01T12:34:56.000Z",
    "commissionType": 1,
    "createdAt": "2024-12-01T12:34:56.000Z",
    "createdById": 123,
    "decision": 1,
    "id": 789,
    "signatureUrl": "http://example.com/signature",
    "signedBy": 456,
    "signedDate": "2024-12-01T12:34:56.000Z",
    "siteId": 123,
    "comment": "Urgent repairs needed.",
    "status": 1,
    "updatedAt": "2024-12-01T12:34:56.000Z",
    "visitType": 1
  }
}

Authorizations

Authorization
string
header
required

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

Headers

X-Session-Token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json

Path Parameters

commissionId
string
required

The unique identifier for the commission.

Body

application/json

Request body for creating a new commission.

siteId
number
required

The ID of the site associated with this commission.

Example:

123

visitType
required

The type of visit: 0 = Inspection, 1 = Survey, 2 = Assessment, 3 = Approval.

Available options:
0
Example:

1

decision

The decision related to the commission: 0 = Pending, 1 = Approved, 2 = Denied, 3 = Reconsidered.

Available options:
0
Example:

1

buildingWork
object
commissionDate
string

The date of the commission.

Example:

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

buildingWorkId
number

The ID of the building work if it is already registered.

Example:

456

comment
string

Any additional comments or notes regarding the commission.

Example:

"This commission is for urgent repairs."

Response

201 - application/json

Commission created successfully.

data
object
required