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

# Map V1 ids to V2 ids (V1 Legacy)

> Returns the company's teams and users (managers and payees) with their V1 ids and V1 RiseIDs alongside the V2 nanoids, RiseIDs and RiseAccounts, plus each payee's pay handler per team. Use it to translate stored V1 identifiers before moving to the V2 API. The company owner and org roles get the whole company; a team manager gets only the teams they can read (`scope`). An unknown company and one you have no access to both return 404 `Company not found`. Pagination applies to users only.



## OpenAPI

````yaml openapi/openapi-v1.yaml GET /v1/mapping
openapi: 3.0.3
info:
  title: B2B API V1 (Legacy)
  description: >-
    Rise is a blockchain first platform where by all actions are secured and
    executed on-chain. Rise has blockchain smart-contracts on the Arbitrum
    optimistic rollup chain that control the flow of funds. That means that
    executing a change within the Rise platform requires a wallet with
    permissions on the user or company's RiseID.
  version: 1.0.0
servers:
  - url: https://b2b-api.dev-riseworks.io
    description: Development
  - url: https://b2b-api.staging-riseworks.io
    description: Staging
  - url: https://b2b-api.riseworks.io
    description: Production
security: []
paths:
  /v1/mapping:
    get:
      tags:
        - Mapping
      summary: Map V1 ids to V2 ids (V1 Legacy)
      description: >-
        Returns the company's teams and users (managers and payees) with their
        V1 ids and V1 RiseIDs alongside the V2 nanoids, RiseIDs and
        RiseAccounts, plus each payee's pay handler per team. Use it to
        translate stored V1 identifiers before moving to the V2 API. The company
        owner and org roles get the whole company; a team manager gets only the
        teams they can read (`scope`). An unknown company and one you have no
        access to both return 404 `Company not found`. Pagination applies to
        users only.
      parameters:
        - schema:
            type: string
          in: query
          name: company_id
          required: false
          description: >-
            Company to map, in any form you hold: a V1 company or team id, a
            company (co-) or team (te-) nanoid, a V1 or V2 RiseID, or a
            RiseAccount. A team resolves to its company. Defaults to the company
            you own; required if you own more than one.
        - schema:
            type: string
          in: query
          name: page
          required: false
          description: 1-indexed page number.
        - schema:
            type: string
          in: query
          name: offset
          required: false
          description: Row offset (alternative to page).
        - schema:
            type: string
          in: query
          name: count
          required: false
          description: >-
            Page size, 1-500 (default 100). Pagination only activates when page
            or offset is set.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      scope:
                        type: string
                        enum:
                          - company
                          - teams
                        description: >-
                          `company` for the owner and org roles: every team and
                          member. `teams` for team managers without an org role:
                          only the teams they can read and those teams' members;
                          company-level roles are omitted.
                      company:
                        type: object
                        properties:
                          nanoid:
                            type: string
                            minLength: 15
                            maxLength: 15
                            pattern: ^co-.*
                            description: >-
                              Identifier of a Rise company. 15-character nanoid
                              prefixed with `co-` (e.g. `co-aBcD1234EfGh`).
                          riseid:
                            type: string
                            minLength: 42
                            maxLength: 42
                            description: >-
                              V2 RiseID of the company: its on-chain identity
                              contract. Not the RiseAccount; use it where the V2
                              API asks for a RiseID.
                          rise_account:
                            type: string
                            pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                            nullable: true
                            description: >-
                              V2 RiseAccount of the company: the contract that
                              holds its funds. Null if not yet deployed. Always
                              null for scope `teams`, which has no company
                              finance access.
                          v1_id:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            nullable: true
                            description: >-
                              V1 id of the entity. Null when the entity was
                              created in V2.
                          v1_riseid:
                            type: string
                            nullable: true
                            description: >-
                              V1 RiseID address. Null when the entity was
                              created in V2 or its V1 RiseID was not carried
                              over during migration.
                          name:
                            type: string
                            description: Company name.
                        required:
                          - nanoid
                          - riseid
                          - rise_account
                          - v1_id
                          - v1_riseid
                          - name
                        additionalProperties: false
                      teams:
                        type: array
                        items:
                          type: object
                          properties:
                            nanoid:
                              type: string
                              minLength: 15
                              maxLength: 15
                              pattern: ^te-.*
                              description: >-
                                Identifier of a Rise team (a workspace below a
                                company). 15-character nanoid prefixed with
                                `te-`.
                            riseid:
                              type: string
                              minLength: 42
                              maxLength: 42
                              description: >-
                                V2 RiseID of the team: its on-chain identity
                                contract. Not the RiseAccount; use it where the
                                V2 API asks for a RiseID.
                            rise_account:
                              type: string
                              pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                              nullable: true
                              description: >-
                                V2 RiseAccount of the team: the contract that
                                holds its funds. Null if not yet deployed.
                            v1_id:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              nullable: true
                              description: >-
                                V1 id of the entity. Null when the entity was
                                created in V2.
                            v1_riseid:
                              type: string
                              nullable: true
                              description: >-
                                V1 RiseID address. Null when the entity was
                                created in V2 or its V1 RiseID was not carried
                                over during migration.
                            name:
                              type: string
                              description: Team name.
                          required:
                            - nanoid
                            - riseid
                            - rise_account
                            - v1_id
                            - v1_riseid
                            - name
                          additionalProperties: false
                      users:
                        type: array
                        items:
                          type: object
                          properties:
                            nanoid:
                              type: string
                              minLength: 15
                              maxLength: 15
                              pattern: ^us-.*
                              description: >-
                                Identifier of a Rise user. 15-character nanoid
                                prefixed with `us-`.
                            riseid:
                              type: string
                              minLength: 42
                              maxLength: 42
                              description: >-
                                V2 RiseID of the user: its on-chain identity
                                contract. Not the RiseAccount; use it where the
                                V2 API asks for a RiseID.
                            rise_account:
                              type: string
                              pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                              nullable: true
                              description: >-
                                V2 RiseAccount of the user: the contract that
                                holds its funds. Null if not yet deployed.
                            v1_id:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              nullable: true
                              description: >-
                                V1 id of the entity. Null when the entity was
                                created in V2.
                            v1_riseid:
                              type: string
                              nullable: true
                              description: >-
                                V1 RiseID address. Null when the entity was
                                created in V2 or its V1 RiseID was not carried
                                over during migration.
                            email:
                              type: string
                              description: User's email address.
                            company_roles:
                              type: array
                              items:
                                type: string
                              description: >-
                                Company-level roles (company owner, org_admin,
                                org_finance_admin, org_hr_admin, org_viewer).
                            teams:
                              type: array
                              items:
                                type: object
                                properties:
                                  team_nanoid:
                                    type: string
                                    minLength: 15
                                    maxLength: 15
                                    pattern: ^te-.*
                                    description: >-
                                      Identifier of a Rise team (a workspace
                                      below a company). 15-character nanoid
                                      prefixed with `te-`.
                                  role:
                                    type: string
                                    description: Role on the team.
                                  type:
                                    type: string
                                    enum:
                                      - manager
                                      - payee
                                    description: >-
                                      `payee` for contractor, aor_contractor and
                                      team_employee; `manager` for every other
                                      team role.
                                  pay_handler:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Payee's pay handler address for this team.
                                      Always null for managers.
                                required:
                                  - team_nanoid
                                  - role
                                  - type
                                  - pay_handler
                                additionalProperties: false
                              description: One entry per team role the user holds.
                          required:
                            - nanoid
                            - riseid
                            - rise_account
                            - v1_id
                            - v1_riseid
                            - email
                            - company_roles
                            - teams
                          additionalProperties: false
                    required:
                      - scope
                      - company
                      - teams
                      - users
                    additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      page:
                        type: number
                      count:
                        type: number
                      offset:
                        type: number
                      has_more:
                        type: boolean
                      next_page:
                        type: number
                        nullable: true
                      next_offset:
                        type: number
                        nullable: true
                    required:
                      - page
                      - count
                      - offset
                      - has_more
                      - next_page
                      - next_offset
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - Bad Request
                  message:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - invalid_parameters
                      errors:
                        type: object
                        additionalProperties:
                          type: array
                          items:
                            type: string
                    required:
                      - type
                      - errors
                    additionalProperties: false
                required:
                  - error
                  - message
                additionalProperties: false
                description: Bad Request - Invalid parameters
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Internal Server Error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.