Skip to main content

Users

OpenAPI Specification

Public API (0.0.0)

2GIS GeoFlow Public API

users

Getting a list of users

Returns a page with a list of users.

Authorizations:
BearerAuth
query Parameters
limit
required
integer

Maximum number of users in the response, from 1 to 500.

cursor
string

Cursor for getting the next or previous page of results.

Responses

Response Schema: application/json
required
object (CursorResponse)

Cursors for the next and previous result pages.

required
Array of objects (UserResponse)

Current page items.

Response samples

Content type
application/json
{
  • "cursor": {
    • "next": "string",
    • "prev": "string"
    },
  • "items": [
    • {
      }
    ]
}

Creating a user

Creates a mobile application user.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Data for creating a user.

first_name
required
string

User first name.

last_name
required
string

User last name.

phone_number
string non-empty

Phone number.

second_name
string non-empty

User middle name.

username
required
string

User login.

Responses

Response Schema: application/json
first_name
string

User first name.

id
required
string <uuid>

User identifier.

last_name
string

User last name.

phone
string

Phone number.

roles
required
Array of strings (RoleName)
Items Enum: "super_admin" "admin" "dispatcher" "agent_group_admin" "user"

User roles.

second_name
string

User middle name.

status
required
string (UserStatus)
Enum: "active" "inactive" "pending"

Account status: active, inactive, or pending.

username
required
string

User login.

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "phone_number": "string",
  • "second_name": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "first_name": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "last_name": "string",
  • "phone": "string",
  • "roles": [
    • "super_admin"
    ],
  • "second_name": "string",
  • "status": "active",
  • "username": "string"
}

Getting a user

Returns user data by its identifier.

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

User identifier.

Responses

Response Schema: application/json
first_name
string

User first name.

id
required
string <uuid>

User identifier.

last_name
string

User last name.

phone
string

Phone number.

roles
required
Array of strings (RoleName)
Items Enum: "super_admin" "admin" "dispatcher" "agent_group_admin" "user"

User roles.

second_name
string

User middle name.

status
required
string (UserStatus)
Enum: "active" "inactive" "pending"

Account status: active, inactive, or pending.

username
required
string

User login.

Response samples

Content type
application/json
{
  • "first_name": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "last_name": "string",
  • "phone": "string",
  • "roles": [
    • "super_admin"
    ],
  • "second_name": "string",
  • "status": "active",
  • "username": "string"
}

Inviting a user

Sends an invitation to the user with a temporary password to log in to the mobile application.

Authorizations:
BearerAuth
Request Body schema: application/json
required

User login to which the invitation will be sent.

username
required
string

User login.

Responses

Response Schema: application/json
id
required
string <uuid>

User identifier.

phone_number
string

Phone number.

status
required
string (UserStatus)
Enum: "active" "inactive" "pending"

Result of inviting a user by login.

temporary_password
required
string

Temporary password issued when inviting the user.

username
required
string

User login.

Request samples

Content type
application/json
{
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "phone_number": "string",
  • "status": "active",
  • "temporary_password": "string",
  • "username": "string"
}