Login
This endpoint allows you to log in to the corporate portal as an administrator
URL: {{base_url}}/corporates/auth/login
Method: POST
{
"email": "[email protected]",
"password": "some password"
}
{
"success": false,
"message": "Login failed",
"data": {
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTYzMjk0MjA0NSwianRpIjoiZTg0NGUyZTk1N2YzNDk2Nzg4NWIxODg1ODE0ZjZhMzQiLCJ1c2VyX2lkIjoxfQ.bDE7zII6lVgk7sOvzr1vKvny1zrGDmFNagWxxoIDtsU",
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjMyODU3NDQ1LCJqdGkiOiJmMjY5OTY1OTFiMDg0Y2E2ODg1MjhhZTkwMzE0MGQ0ZSIsInVzZXJfaWQiOjF9.h84LgT3Bt1m4WZsBbJJz7hoSf6wdjr8EYyBMTwpT9VQ",
"user": {
"uuid": "some-uuid",
"first_name": "First",
"last_name": "name",
"mobile": "phone number",
"email": "[email protected]",
}
]
},
"errors": "'NoneType' object has no attribute 'managing_organization'"
}
Get manageable corporates
This endpoint allows you to retrieve details of the corporate you can manage as a serenity user
URL: {{base_url}}/corporates/get-manageable-organizations?user=user_uiid
Method: GET
{
"success": true,
"message": "Successfully retrieved manageable organizations",
"data": [
{
"name": "Tisla Battery corp",
"uuid": "uuid",
"address": "address"
},
{
"name": "Tisla Battery corp",
"uuid": "uuid",
"address": "address"
},
],
"errors": "'NoneType' object has no attribute 'managing_organization'"
}