Skip to main content
POST
/
interventions-users
/
v1
/
rs
/
interventions
/
{interventionId}
/
users
/
{userId}
Create intervention-user association
curl --request POST \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/interventions-users/v1/rs/interventions/{interventionId}/users/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "attendanceStatus": "present"
}
'
{
  "data": {
    "id": 1,
    "userId": 1,
    "interventionId": 1,
    "attendanceStatus": "present",
    "deletedAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z",
    "createdAt": "2024-01-01T00:00:00.000Z"
  },
  "presignedUrl": "https://example.com/presigned-url"
}

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

Details required to create intervention-user association

attendanceStatus
enum<string>

Attendance status of the user for the intervention.

Available options:
present,
absent
Example:

"present"

attendanceProof
object

Response

201 - application/json

The intervention-user association has been created

data
object
required
presignedUrl
string<uri>

Presigned URL to upload the file

Example:

"https://example.com/presigned-url"