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

# List all legal entities

> Returns a paginated list of the seller's legal entities. Use a legal entity's id as `legal_entity_id` when creating a subscription to specify which entity issues it.



## OpenAPI

````yaml https://api.salesbricks.com/api/v2/openapi.yaml get /legal-entities
openapi: 3.0.3
info:
  title: Salesbricks REST API
  version: 2.0.0
  description: API reference for external integrations
servers:
  - url: https://api.salesbricks.com/api/v2
    description: Production
  - url: https://api.staging.salesbricks.com/api/v2
    description: Staging
security:
  - ApiKeyAuth: []
tags:
  - name: Subscriptions
    description: >-
      Operations related to subscription management, including creation,
      updates, and retrieving subscription details. Subscriptions can be
      upgraded to add / remove add-ons by using the POST
      /subscriptions/{subscription_id}/upgrade endpoint and can be recasted for
      replacing the current agreement using the POST
      /subscriptions/{subscription_id}/recast endpoint
  - name: Customers
    description: >-
      Operations related to customer management, including creation, updates,
      and managing customer person objects.
  - name: Invoices
    description: Operations related to subscription's invoicing details.
  - name: Plans
    description: >-
      Operations related to listing and getting plan details including bricks in
      the plan.
  - name: Payment Methods
    description: Operations related to subscription's payment method.
paths:
  /legal-entities:
    get:
      tags:
        - Legal Entities
      summary: List all legal entities
      description: >-
        Returns a paginated list of the seller's legal entities. Use a legal
        entity's id as `legal_entity_id` when creating a subscription to specify
        which entity issues it.
      operationId: listLegalEntities
      parameters:
        - name: limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          required: false
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
        - in: query
          name: ordering
          schema:
            type: string
            enum:
              - '-created_at'
              - created_at
          description: Order results by field (prefix with '-' for descending order)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSellerLegalEntityList'
          description: ''
components:
  schemas:
    PaginatedSellerLegalEntityList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/SellerLegalEntity'
    SellerLegalEntity:
      type: object
      description: Read serializer for a seller's legal entity.
      properties:
        legal_entity_id:
          type: string
          format: uuid
          description: Unique identifier for the legal entity
        name:
          type: string
          description: Display name of the legal entity
        legal_name:
          type: string
          description: Registered legal name
        display_name:
          type: string
          description: Document-friendly name, e.g. 'Legal Name (Name)'
        hq_address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          description: Headquarters address, if set
      required:
        - display_name
        - hq_address
        - legal_entity_id
        - legal_name
        - name
    Address:
      type: object
      description: >-
        Read serializer for an address. Works for both an ``Address`` model

        instance and a JSON snapshot dict (e.g.
        ``InvoiceVersion.buyer_address``),

        so all fields are nullable to accommodate partial/legacy snapshots.
      properties:
        line_1:
          type: string
          nullable: true
          description: First line of the address
        line_2:
          type: string
          nullable: true
          description: Second line of the address
        city:
          type: string
          nullable: true
          description: City
        region:
          type: string
          nullable: true
          description: State, province, or region
        zip:
          type: string
          nullable: true
          description: Postal/ZIP code
        country:
          type: string
          nullable: true
          description: Country
      required:
        - city
        - country
        - line_1
        - line_2
        - region
        - zip
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-SALESBRICKS-KEY
      description: API key for authentication

````

## Related topics

- [Setup](/integrations/stripe/setup.md)
- [Adding Team Members](/quickstart-guide/adding-team-members.md)
- [Role-based access control (RBAC)](/settings/team/rbac.md)
