openapi: 3.2.0 info: title: Float Public Users API version: 1.0.0 description: Float's Public API servers: - url: https://api.floatfinancial.com description: Float's Production API tags: - name: Users paths: /v1/users: get: operationId: getUsers summary: Retrieve a paginated list of users parameters: - in: query name: created_at__gte schema: type: string format: date-time default: '1970-01-01T00:00:00Z' description: Filter for records created at or after this timestamp. Default is the epoch start time in UTC. - in: query name: created_at__lte schema: type: - string - 'null' format: date-time description: Filter for records created at or before this timestamp. Default is the current UTC time. - in: query name: order_by schema: enum: - created_at - -created_at type: string default: -created_at minLength: 1 description: 'The ordering of the results. Use ''created_at'' for ascending order or ''-created_at'' for descending order. * `created_at` - created_at * `-created_at` - -created_at' - in: query name: page schema: type: integer minimum: 1 default: 1 description: The page number to retrieve, starting from 1. - in: query name: page_size schema: type: integer maximum: 1000 minimum: 1 default: 1000 description: The number of items per page, maximum is 1000. tags: - Users security: - bearerToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/CountablePagedResponse_UserSchema' description: A paginated list of users post: operationId: createUser summary: Create a new user parameters: - in: header name: X-Idempotency-Key schema: type: string description: A unique key to ensure idempotency of the request required: true tags: - Users requestBody: content: application/json: schema: $ref: '#/components/schemas/UserCreateInputSchema' required: true security: - bearerToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/UserSchema' description: User created successfully '400': description: Invalid input data /v1/users/{user_id}: get: operationId: getUserById summary: Retrieve a single user by ID parameters: - in: path name: user_id schema: type: string format: uuid required: true tags: - Users security: - bearerToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/UserSchema' description: A single user '404': description: User not found components: schemas: ReferenceSchema_TeamSchema_: properties: id: description: Unique identifier for the referenced entity. format: uuid title: Id type: string required: - id title: ReferenceSchema[TeamSchema] type: object OrderByTypes: enum: - created_at - -created_at title: OrderByTypes type: string RoleEnum: enum: - administrator - ap_clerk - bookkeeper - manager - primary_administrator - spender type: string CountablePagedResponse_UserSchema: properties: items: description: The list of items on the current page. items: $ref: '#/components/schemas/UserSchema' title: Items type: array page: description: The current page number. title: Page type: integer page_size: description: The number of items per page. title: Page Size type: integer created_at__lte: description: The most recent date for which results are included. format: date-time title: Created At Lte type: string created_at__gte: description: The least recent date for which results are included. format: date-time title: Created At Gte type: string ordered_by: $ref: '#/components/schemas/OrderByTypes' description: The ordering used to sort results. pages: description: The total number of pages available. title: Pages type: integer count: description: The total number of items available. title: Count type: integer required: - items - page - page_size - created_at__lte - created_at__gte - ordered_by - pages - count title: CountablePagedResponse_UserSchema type: object UserCreateInputSchema: properties: first_name: description: First name of the user. title: First Name type: string last_name: description: Last name of the user. title: Last Name type: string email: description: Email address of the user. title: Email type: string title: description: Job title of the user. title: Title type: string role: allOf: - $ref: '#/components/schemas/RoleEnum' description: Role of the user in the system. title: Role manager_id: default: null description: ID of the user's manager. format: uuid nullable: true title: Manager Id type: string subsidiary_id: default: null description: ID of the user's subsidiary. format: uuid nullable: true title: Subsidiary Id type: string team_ids: default: [] description: List of team IDs the user should belong to. items: format: uuid type: string title: Team Ids type: array required: - first_name - last_name - email - title - role title: UserCreateInputSchema type: object UserSchema: properties: id: description: Unique identifier for the user. format: uuid title: Id type: string teams: description: List of teams the user belongs to. items: $ref: '#/components/schemas/ReferenceSchema_TeamSchema_' title: Teams type: array first_name: description: First name of the user. title: First Name type: string last_name: description: Last name of the user. title: Last Name type: string email: description: Email of the user. title: Email type: string role: allOf: - $ref: '#/components/schemas/RoleEnum' description: Role of the user. title: Role picture: default: null description: URL of the user's profile picture. nullable: true title: Picture type: string created_at: description: Timestamp when the user was created. format: date-time title: Created At type: string required: - id - teams - first_name - last_name - email - role - created_at title: UserSchema type: object securitySchemes: bearerToken: type: http scheme: bearer