Skip to main content
POST
/
buildingworks
/
v2
/
rs
Create a new building work entry
curl --request POST \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/buildingworks/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "authorizationNumber": "Authorization number",
  "status": "received",
  "siteIds": [
    1
  ],
  "description": "Building work description",
  "contractorName": "Contractor name",
  "supervisingTechnicianName": "Supervising technician name",
  "architectName": "Architect name",
  "startAt": "2024-11-20T10:30:00.000Z",
  "endAt": "2024-11-20T10:30:00.000Z"
}
'
{
  "data": {
    "id": 1,
    "description": "Building work description",
    "authorizationNumber": "Authorization number",
    "status": 1,
    "receptionDate": "2024-11-20T10:30:00.000Z",
    "workNature": "Work nature",
    "contractorName": "Contractor name",
    "supervisingTechnicianName": "Supervising technician name",
    "architectName": "Architect name",
    "createdByUserId": 1,
    "startAt": "2024-11-20T10:30:00.000Z",
    "endAt": "2024-11-20T10:30:00.000Z",
    "archivedAt": "2024-11-20T10:30:00.000Z",
    "deletedAt": "2024-11-20T10:30:00.000Z",
    "updatedAt": "2024-12-05T14:56:23.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z"
  }
}

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"

Body

application/json

The body of the request should contain the details of the building work to be created.

authorizationNumber
string
required

Authorization number of the building work.

Maximum string length: 100
Example:

"Authorization number"

status
any
required
Available options:
received,
1,
2,
3,
5
siteIds
integer[]
required
Minimum array length: 1

Unique identifier of the site.

Required range: -9007199254740991 <= x <= 9007199254740991
description
string

Description of the building work.

Maximum string length: 2000
Example:

"Building work description"

contractorName
string

Name of the contractor.

Maximum string length: 255
Example:

"Contractor name"

supervisingTechnicianName
string

Name of the supervising technician.

Maximum string length: 255
Example:

"Supervising technician name"

architectName
string

Name of the architect.

Maximum string length: 255
Example:

"Architect name"

startAt

Start date of the building work, null if not started.

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-11-20T10:30:00.000Z"

endAt

End date of the building work, null if not ended.

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-11-20T10:30:00.000Z"

Response

201 - application/json

Building work entry created successfully.

data
object
required