{- "user": {
- "email": "operator@example.com",
- "password": "secret"
}
}
{- "bearer_token": "string",
- "refresh_token": "string",
- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "name": "John Doe",
- "roles": [
- "SysAdmin"
], - "org_id": "VersaFleet"
}
}
{- "user": {
- "email": "driver@example.com",
- "password": "secret",
- "name": "Cleo",
- "phone_number": 12345678
}
}
{- "message": "Successfully register freelance driver account"
}
object |
{- "user": {
- "email": "user@example.com",
- "phone_number": "string"
}
}
{- "message": "Successfully sent security code to the email"
}
{- "user": {
- "name": "Budi",
- "password": "secret",
- "invitation_token": "Bmdvstzgm6ySjkBWN7pV"
}
}
{- "status": "Invitation Accepted!"
}
The invited user will automatically been assigned to OrgAdmin's organisation
object |
{- "user": {
- "email": "user@example.com"
}
}
{- "status": "Invitation sent!"
}
The invited user will automatically been assigned to OrgTransporter's organisation
object |
{- "user": {
- "email": "user@example.com"
}
}
{- "status": "Invitation sent!"
}
object |
{- "user": {
- "email": "user@example.com",
- "org_id": "VersaFleet"
}
}
{- "status": "Invitation sent!"
}
{- "user": {
- "email": "user@example.com"
}
}
{- "message": "You will receive an email with instructions on how to reset your password in a few minutes."
}
{- "user": {
- "password": "secret",
- "reset_password_token": "tBPAwD_N4ctQ6vCiUHqv"
}
}
{- "message": "Your password has been changed successfully."
}
object |
{- "user": {
- "name": "John Doe",
- "current_password": "secret",
- "password": "supersecret"
}
}
{- "message": "Your account has been updated successfully."
}
object |
{- "user": {
- "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "name": "John Doe",
- "phone_number": 68780444555
}
}
{- "message": "Your account has been updated successfully."
}
Only SysAdmin can access it, Users can be filtered by org_id
query string
org_id | string Filter users by org id (Only available for SysAdmin) |
search | string Filter users by name or email (Only available for SysAdmin) |
page | integer <int64> >= 1 Default: 1 |
per_page | integer <int64> >= 1 Default: 20 |
{- "users": [
- {
- "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "email": "xxx@xxxx.com",
- "name": "John Doe",
- "created_at": "2020-12-30T04:21:29.712Z",
- "updated_at": "2020-12-30T04:21:29.712Z",
- "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "roles": [
- "SysAdmin"
]
}
], - "meta": {
- "page": 1,
- "per_page": 20,
- "total": 1
}
}
Only SysAdmin can access it
userID required | string ID of the user to be read |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "name": "John Doe",
- "org_id": "VersaFleet",
- "roles": [
- "SysAdmin"
], - "confirmed_at": "2019-08-24T14:15:22Z"
}
Only SysAdmin can access it, update the user email, adding deleted prefix
object |
{- "user": {
- "email": "operator@example.com"
}
}
{- "code": "success",
- "message": "Your user has been successfully deleted."
}
Only SysAdmin can access it
string user email |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "name": "John Doe",
- "org_id": "VersaFleet",
- "roles": [
- "SysAdmin"
], - "confirmed_at": "2019-08-24T14:15:22Z"
}
Only OrgAdmin can access it, Users are filtered by org id (same as user logged in)
page | integer <int64> >= 1 Default: 1 |
per_page | integer <int64> >= 1 Default: 20 |
{- "users": [
- {
- "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "email": "xxx@xxxx.com",
- "name": "John Doe",
- "created_at": "2020-12-30T04:21:29.712Z",
- "updated_at": "2020-12-30T04:21:29.712Z",
- "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "roles": [
- "OrgAdmin"
]
}
], - "meta": {
- "page": 1,
- "per_page": 20,
- "total": 1
}
}
OrgAdmin and OrgTransporter can access it, update the currently logged in user
object |
{- "user": {
- "name": "John Doe",
- "phone_number": 12345678
}
}
{- "code": "success",
- "message": "Your user has been successfully updated."
}
Only Driver can access it, update the currently logged in user's email
object |
{- "user": {
- "user": {
- "phone_number": 12345678,
- "driver_profile": {
- "version_rev": "xx-0000"
}
}
}
}
{- "code": "success",
- "message": "Your user has been successfully deleted."
}
Only Transporter can access it
object |
{- "user": {
- "user": {
- "email": "operator@example.com"
}
}
}
{- "code": "success",
- "message": "Your user has been successfully deleted."
}
OrgAdmin and OrgTransporter can access it
userID required | string ID of the user to be read |
{- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "name": "John Doe",
- "roles": [
- "SysAdmin"
], - "org_id": "VersaFleet"
}
}
Only users who registered through merchant self registration are allowed to use this API
object |
{- "user": {
- "name": "John",
- "password": "randomPassword"
}
}
{- "code": "success",
- "message": "Successfully set name and password"
}
Only SysAdmin is allowed and the user should not have an org_id before
object |
{- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
}
}
{- "code": "success",
- "message": "Successfully assign org to user"
}
Only SysAdmin is allowed and the user must not be confirmed before
userID required | string ID of the user to be confirmed |
{- "code": "success",
- "message": "User successfully confirmed"
}
For internal fill client_key with 'gotsurge'
refresh_token | string |
client_key | string |
{- "refresh_token": "string",
- "client_key": "string"
}
{- "bearer_token": "string"
}
object |
{- "user": {
- "email": "platformpartners-child@example.com",
- "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- "role_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
{- "status": "Invitation sent!"
}
Receives an MDP Bearer token via the Authorization header and attempts to verify it with the MDP service. If successful, it generates and returns a GotSurge Bearer token for the corresponding user (or a default payload if the user doesn't exist in GotSurge yet).
Authorization required | string Example: Bearer mdp_token_value_here The Bearer token provided by MDP. |
{- "message": "Token exchanged successfully",
- "bearer_token": "eyJhbGciOiJIUzI1NiJ9...",
- "bearer_token_expired_at": 1678886400
}