Account management
You can List, Create, Edit and Delete Accounts using these endpoints.
Model
A sample Account object is below
{
"organization":"1654740730258x343197985783152640",
"building": "T2",
"email": "[email protected]",
"externalID": "1234456",
"firstName": "Happy",
"lastName": "Resident",
"passphrase": "mypersonalpassphrase3",
"phone": "4156234444",
"stopDate": "2023-06-09T02:12:11.858Z",
"tenantServiceStatus": "Active",
"terminationMode": "Schedule stop date",
"unit": "1112"
}
Managing Accounts
List all Accounts
get
List all Resident in the Organization
Authorizations
Responses
200
List all Resident in the Organization
application/json
get
GET /api/1.1/obj/resident HTTP/1.1
Host: www.cusna.io
Authorization: Bearer JWT
Accept: */*
200
List all Resident in the Organization
{
"response": {
"cursor": 0,
"results": [
{
"Modified Date": "2022-06-09T03:27:02.929Z",
"Created Date": "2022-06-09T02:12:11.904Z",
"Created By": "1654117194722x920684661190674000",
"account": "1654740733756x271022408151065920",
"building": "T2",
"email": "[email protected]",
"externalID": "1234456",
"firstName": "Happy",
"lastName": "Resident",
"organization": "1654740730258x343197985783152640",
"passphrase": "mypersonalpassphrase",
"phone": "4156234444",
"qrCode": "//s3.amazonaws.com/appforest_uf/f1654740734295x563722479118820900/create-qr-code",
"startDate": "2022-06-09T02:12:11.858Z",
"stopDate": "2023-06-09T02:12:11.858Z",
"tenantServiceStatus": "Active",
"terminationMode": "Schedule stop date",
"terminationPID": "3",
"unit": "1112",
"_id": "1654740731860x896778368875644200"
}
],
"remaining": 0,
"count": 1
}
}
Create and activate new Accounts. The activation email is sent automatically on the service activation date.
post
Auto generated using Swagger Inspector
Authorizations
Body
tenantServiceStatusstringOptional
firstNamestringOptional
lastNamestringOptional
terminationModestringOptional
unitstringOptional
phonestringOptional
organizationstringOptional
externalIDstringOptional
passphrasestringOptional
buildingstringOptional
emailstringOptional
stopDatestringOptional
Responses
201
Auto generated using Swagger Inspector
application/json
post
POST /api/1.1/obj/resident HTTP/1.1
Host: www.cusna.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 422
"{\n \"building\": \"T2\",\n \"email\": \"[email protected]\",\n \"externalID\": \"1234456\",\n \"firstName\": \"Happy\",\n \"lastName\": \"Resident\",\n \"passphrase\": \"mypersonalpassphrase3\",\n \"phone\": \"4156234444\",\n \"stopDate\": \"2023-06-09T02:12:11.858Z\",\n \"tenantServiceStatus\": \"Active\",\n \"terminationMode\": \"Schedule stop date\",\n \"unit\": \"1112\"\n}"
201
Auto generated using Swagger Inspector
{
"status": "success",
"id": "1654749146818x949167587577863300"
}
Edit an Account
patch
Edit Resident
Authorizations
Path parameters
idstringRequiredExample:
1654740731860x896778368875644200
Body
tenantServiceStatusstringOptional
firstNamestringOptional
lastNamestringOptional
terminationModestringOptional
unitstringOptional
phonestringOptional
externalIDstringOptional
passphrasestringOptional
buildingstringOptional
emailstringOptional
stopDatestringOptional
Responses
405
Auto generated using Swagger Inspector
application/json
patch
PATCH /api/1.1/obj/resident/{id} HTTP/1.1
Host: www.cusna.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 422
"{\n \"building\": \"T2\",\n \"email\": \"[email protected]\",\n \"externalID\": \"1234456\",\n \"firstName\": \"Happy\",\n \"lastName\": \"Resident\",\n \"passphrase\": \"mypersonalpassphrase4\",\n \"phone\": \"4156234444\",\n \"stopDate\": \"2023-06-09T02:12:11.858Z\",\n \"tenantServiceStatus\": \"Active\",\n \"terminationMode\": \"Schedule stop date\",\n \"unit\": \"1112\"\n}"
405
Auto generated using Swagger Inspector
{"statusCode":405,"body":{"status":"ERROR","message":"Unrecognized method. Currently supported: get,post"}}
Delete an Account and terminate automatically its service
Send activation email
Send again the activation email to an Account
post
Send activaitn email to resident
Body
userstringOptional
Responses
200
Auto generated using Swagger Inspector
application/json
post
POST /api/1.1/wf/sendactivationemail HTTP/1.1
Host: www.cusna.io
Content-Type: application/json
Accept: */*
Content-Length: 57
"{\n \"user\":\"1654058988310x459285687337671600\"\n}"
200
Auto generated using Swagger Inspector
{
"status": "success",
"response": {}
}
Last updated
Was this helpful?