# List businesses

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/businesses:
    get:
      summary: List businesses
      deprecated: false
      description: >
        Retrieve all businesses that the closed-loop orchestrator manages.

        This endpoint lists every business entity registered within the
        ecosystem, including their operational accounts and core metadata.


        It supports pagination and can be filtered by status.

        If no filters are applied, it returns all active and inactive businesses
        in the system (paginated).
      operationId: list-businesses
      tags:
        - Vrtx Closed loop/Businesses
        - Businesses
      parameters:
        - name: status
          in: query
          description: >-
            Optional filter for business status (for example ACTIVE or
            INACTIVE).
          required: false
          example: ACTIVE
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum records to return in this page (1..200). Defaults to 10.
          required: false
          example: 50
          schema:
            type: integer
            format: int32
        - name: cursor
          in: query
          description: Opaque cursor returned from a previous response when paginating.
          required: false
          example: eyJvZmZzZXQiOiI4NGFmIn0=
          schema:
            type: string
        - name: from
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: search
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: ''
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
                properties: {}
                x-apidog-ignore-properties: []
              examples:
                BusinessList:
                  summary: BusinessList
                  value:
                    items:
                      - id: 84a86c0f-39bb-41e6-a531-7065a32b990a
                        unified_number: '7000182993'
                        cr_number: '1234567895'
                        vat_number: '312345678900003'
                        official_name_ar: شركة فرتكس العربية
                        official_name_en: Vrtx Arabia Trading Co.
                        short_name_ar: فرتكس العربية
                        short_name_en: Vrtx KSA
                        cr_expiry_date: '2025-12-31T00:00:00.000Z'
                        email: ops@vrtx.sa
                        mobile: '+966501234567'
                        prefix3: '092'
                        account_number: '009200005016'
                        status: ACTIVE
                        created_at: '2025-10-25T11:02:50.415Z'
                        updated_at: '2025-10-25T11:02:50.415Z'
                      - id: 9fa5cea8-6edb-4196-800f-8809e08f1365
                        unified_number: '7008282993'
                        cr_number: '1010456792'
                        vat_number: '398765432100003'
                        official_name_ar: شركة فرتكس العربية
                        official_name_en: Vrtx Arabia Trading Co.
                        short_name_ar: فرتكس العربية
                        short_name_en: Vrtx KSA
                        cr_expiry_date: '2025-12-31T00:00:00.000Z'
                        email: ops@vrtx.sa
                        mobile: '+966501234567'
                        prefix3: '998'
                        account_number: '099800003024'
                        status: ACTIVE
                        created_at: '2025-10-25T07:21:02.725Z'
                        updated_at: '2025-10-25T07:21:02.725Z'
                      - id: 2bb58ca6-1b9a-47b4-ab4d-b2996f0498f3
                        unified_number: '7628282993'
                        cr_number: '1234567891'
                        vat_number: '398765432100001'
                        official_name_ar: شركة الاختبار المحدودة
                        official_name_en: Testing Company LLC
                        short_name_ar: التجريبية
                        short_name_en: Test Co.
                        cr_expiry_date: '2025-12-31T00:00:00.000Z'
                        email: ops@test.sa
                        mobile: '+966501234567'
                        prefix3: '542'
                        account_number: '054200001011'
                        status: ACTIVE
                        created_at: '2025-10-25T05:37:30.532Z'
                        updated_at: '2025-10-25T05:37:30.532Z'
                      - id: 9bca8aba-99b6-41c2-8f1e-55c96fcb38d2
                        unified_number: '7123456787'
                        cr_number: '1234567890'
                        vat_number: '398765432100002'
                        official_name_ar: شركة فرتكس العربية
                        official_name_en: Vrtx Arabia Trading Co.
                        short_name_ar: فرتكس العربية
                        short_name_en: Vrtx KSA
                        cr_expiry_date: '2026-12-31T00:00:00.000Z'
                        email: ops@vrtx.sa
                        mobile: '+966501234567'
                        prefix3: '137'
                        account_number: '013700000014'
                        status: ACTIVE
                        created_at: '2025-10-25T05:11:02.839Z'
                        updated_at: '2025-10-25T05:11:02.839Z'
                    next_cursor: >-
                      MjAyNS0xMC0yNVQwNToxMTowMi44Mzk5NTdafDliY2E4YWJhLTk5YjYtNDFjMi04ZjFlLTU1Yzk2ZmNiMzhkMg
                    has_next: false
          headers: {}
          x-apidog-name: OK
        '401':
          description: Not Authorized
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Unauthorized:
                  summary: Unauthorized
                  value:
                    error_code: UNAUTHORIZED_ACCESS
                    error_message: You are not authorized to access this resource.
                    details:
                      - field: authorization
                        message: Valid Bearer token required
                        code: unauthorized_access
                    status_code: 401
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Not Allowed
          content:
            application/json:
              schema: *ref_0
              examples:
                Forbidden:
                  summary: Forbidden
                  value:
                    error_code: FORBIDDEN
                    error_message: Forbidden
                    details:
                      - field: authorization
                        message: Insufficient permissions to access this resource
                        code: forbidden
                    status_code: 403
          headers: {}
          x-apidog-name: Forbidden
      security:
        - bearerAuth3: []
          x-apidog:
            schemeGroups:
              - id: eFzCWlImWbNcljTPS9gck
                schemeIds:
                  - bearerAuth3
            required: true
            use:
              id: eFzCWlImWbNcljTPS9gck
            scopes:
              eFzCWlImWbNcljTPS9gck:
                bearerAuth3: []
      x-apidog-folder: Vrtx Closed loop/Businesses
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-24814162-run
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error_code:
          type: string
        error_message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
        status_code:
          type: integer
          format: int32
      x-apidog-orders:
        - error_code
        - error_message
        - details
        - status_code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
      x-apidog-orders:
        - field
        - message
        - code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
