> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rio.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all users

### Additional information.

<Note>
  If no value is entered for any filter, the current user information is returned.

  <Accordion title="Click here to see the schema">
    ```json theme={null}
    {
      "platformFeeRanges": {
        "MX": {
          "buy": [],
          "sell": []
        },
        "PE": {
          "buy": [],
          "sell": []
        },
        "CO": {
          "buy": [],
          "sell": []
        },
        "BR": {
          "buy": [],
          "sell": []
        }
      },
      "invoicing": {
        "MX": {
          "fiscalRegimenCode": 605
        }
      },
      "individualData": {
        "firstName": "Name",
        "middleName": "Middle",
        "lastName": "Last",
        "birthday": "1988-06-06T00:00:00.000Z"
      },
      "businessData": {
        "businessName": "Business Name",
      },
      "createdAt": "2024-05-28T19:08:48.590Z",
      "type": "individual",
      "phoneNumber": "+526589562354",
      "email": "testing@rio.trade",
      "onboarding": {
        "MX": {
          "status": "approved",
          "onboardingId": "66562ae87f5e01543da3b784",
          "aiPriseId": "1c1bba7c-59e7-4e00-956e-0803ad6e259d",
          "address": {
            "street1": "Street",
            "street2": "Street",
            "city": "City",
            "state": "State",
            "country": "Country",
            "postalCode": "12345"
          },
          "hasAcceptedTerms": true
        }
      },
      "id": "66562bc04fe8bf83c577c178"
    }
    ```
  </Accordion>
</Note>


## OpenAPI

````yaml GET /api/users
openapi: 3.0.0
info:
  version: v1.0.0
  title: Users API
  description: API for managing users in the Rio platform
servers:
  - url: https://app.sandbox.rio.trade
security:
  - apiKeyAuth: []
paths:
  /api/users:
    get:
      summary: Get all users
      parameters:
        - $ref: '#/components/parameters/typeQueryParameter'
        - $ref: '#/components/parameters/brokerIdQueryParameter'
        - $ref: '#/components/parameters/searchQueryParameter'
        - $ref: '#/components/parameters/authIdQueryParameter'
        - $ref: '#/components/parameters/firstNameQueryParameter'
        - $ref: '#/components/parameters/lastNameQueryParameter'
        - $ref: '#/components/parameters/businessNameQueryParameter'
        - $ref: '#/components/parameters/onboardingStatusQueryParameter'
        - $ref: '#/components/parameters/pageQueryParameter'
        - $ref: '#/components/parameters/limitQueryParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUsersSchema'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedSchema'
          description: Unauthorized
components:
  parameters:
    typeQueryParameter:
      name: type
      in: query
      description: Type of user by which you want to filter.
      schema:
        type: string
        enum:
          - business
          - individual
    brokerIdQueryParameter:
      name: brokerId
      in: query
      description: Id of the broker for which you want to get the list of users.
      schema:
        type: string
        example: 655f4084b96e4fb76f5a0e6e
    searchQueryParameter:
      name: search
      in: query
      description: Allows you to search for any text.
      schema:
        type: string
        example: Name
    authIdQueryParameter:
      name: authId
      in: query
      description: Id of the user for which you want to get the list of users.
      schema:
        type: string
        example: 665f4084b96e4fb76f5a0e0c
    firstNameQueryParameter:
      name: firstName
      in: query
      description: First name of the individual to be searched.
      schema:
        type: string
    lastNameQueryParameter:
      name: lastName
      in: query
      description: Last name of the individual to be searched.
      schema:
        type: string
    businessNameQueryParameter:
      name: businessName
      in: query
      description: Name of the business to be searched.
      schema:
        type: string
    onboardingStatusQueryParameter:
      name: onboardingStatus
      in: query
      description: Individual or business onboarding status.
      schema:
        type: string
        enum:
          - approved
          - individualPassed
          - individualReview
          - individualFailed
          - legalRepresentativeApproved
          - legalRepresentativeFailed
          - bridgeToSAndKYCCompleted
          - bridgeKYCCompleted
          - bridgeKYCApproved
          - bridgeToSCompleted
          - started
          - failed
          - review
          - none
    pageQueryParameter:
      name: page
      in: query
      description: Used to specify the current page you want to get in the paging results.
      schema:
        type: integer
    limitQueryParameter:
      name: limit
      in: query
      description: >-
        Used to specify the maximum number of records to be returned on a single
        page.
      schema:
        type: integer
  schemas:
    responseUsersSchema:
      type: array
      items:
        type: object
        properties:
          individualData:
            type: object
            properties:
              firstName:
                type: string
                description: First name of the user.
              middleName:
                type: string
                description: Middle name of the user.
              lastName:
                type: string
                description: Last name of the user.
          businessData:
            type: object
            properties:
              businessName:
                type: string
                description: Business Name
          createdAt:
            type: string
            description: Creation date of the user.
            example: '2024-05-29T15:36:03.225Z'
          type:
            type: string
            description: Type of the user.
            enum:
              - business
              - individual
          email:
            type: string
            description: Email of the user.
            example: testing@rio.trade
          brokerId:
            type: string
            description: Broker ID of the user.
            example: 66562bc04fe8bf83c577c178
          onboarding:
            type: object
            properties:
              status:
                type: string
                description: Onboarding status for Mexico.
                enum:
                  - approved
                  - individualPassed
                  - individualReview
                  - individualFailed
                  - legalRepresentativeApproved
                  - legalRepresentativeFailed
                  - bridgeToSAndKYCCompleted
                  - bridgeKYCCompleted
                  - bridgeKYCApproved
                  - bridgeToSCompleted
                  - started
                  - failed
                  - review
                  - none
              country:
                type: string
                description: Country of the user's address.
                enum:
                  - MX
                  - PE
                  - CO
              hasAcceptedTerms:
                type: boolean
                description: Indicates if the user has accepted the terms and conditions.
                example: true
          id:
            type: string
            description: ID of the user.
            example: 66574b634fe8bf83c57813ac
          platformFeeRanges:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                      properties:
                        min:
                          type: number
                        max:
                          type: number
                        fee:
                          type: number
                        nextDaySettlementFee:
                          type: number
                        _id:
                          type: string
                  sell:
                    type: array
                    items:
                      type: object
                      properties:
                        min:
                          type: number
                        max:
                          type: number
                        fee:
                          type: number
                        nextDaySettlementFee:
                          type: number
                        _id:
                          type: string
              PE:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                  sell:
                    type: array
                    items:
                      type: object
              CO:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                  sell:
                    type: array
                    items:
                      type: object
              BR:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                  sell:
                    type: array
                    items:
                      type: object
          accumulatedVolumeInUSD:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
              PE:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
          attributes:
            type: array
            items:
              type: string
            description: User attributes
          serviceFee:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
              PE:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
    unauthorizedSchema:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: number
                example: 19
              message:
                type: string
                example: Not authorized
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````