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

# List my company memberships

> Returns the authenticated customer's company memberships, each with the node it
is held on and the path of nodes above it. Standing covers the node and every
node below it, so a membership on a parent authorizes buying for its divisions.




## OpenAPI

````yaml /api-reference/store.yaml get /api/v3/store/account/companies
openapi: 3.0.3
info:
  title: Store API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: >
    Spree Store API v3 - Customer-facing storefront API for building headless
    commerce experiences.


    ## Authentication


    The Store API uses two authentication methods:


    ### API Key (Required)

    All requests must include a publishable API key in the `x-spree-api-key`
    header.


    ### JWT Bearer Token (For authenticated customers)

    After login, include the JWT token in the `Authorization: Bearer <token>`
    header.


    ### Order Token (For guest checkout)

    When creating an order, a `token` is returned. Include this in the
    `x-spree-token` header

    for guest access to that specific order.


    ## Response Format


    All responses are JSON. List endpoints return paginated responses with
    `data` and `meta` keys.


    ## Error Handling


    Errors return a consistent format:

    ```json

    {
      "error": {
        "code": "record_not_found",
        "message": "Product not found"
      }
    }

    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Customer authentication (login, logout, token refresh)
  - name: Product Catalog
    description: Products and categories
  - name: Carts
    description: Shopping cart management
  - name: Orders
    description: Order lookup
  - name: Customers
    description: Customer account, addresses, saved payment methods, and order history
  - name: Markets
    description: Markets, countries, currencies, and locales
  - name: Wishlists
    description: Customer wishlists
  - name: Newsletter Subscribers
    description: Guest and customer newsletter subscriptions (double opt-in)
  - name: Policies
    description: Store policies (return policy, privacy policy, terms of service)
  - name: Digitals
    description: Digital product downloads
paths:
  /api/v3/store/account/companies:
    get:
      tags:
        - Companies
      summary: List my company memberships
      description: >
        Returns the authenticated customer's company memberships, each with the
        node it

        is held on and the path of nodes above it. Standing covers the node and
        every

        node below it, so a membership on a parent authorizes buying for its
        divisions.
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: memberships listed
          content:
            application/json:
              example:
                data:
                  - id: cmem_UkLWZg9DAJ
                    company_id: comp_UkLWZg9DAJ
                    customer_id: cust_UkLWZg9DAJ
                    email: pasty.koepp@farrell.name
                    company:
                      id: comp_UkLWZg9DAJ
                      name: Acme Industrial
                      kind: company
                      po_number_required: false
                      parent_id: null
                      ancestors: []
        '401':
          description: not authenticated
          content:
            application/json:
              example:
                error:
                  code: authentication_required
                  message: Authentication required
      security:
        - api_key: []
          bearer_auth: []
      x-codeSamples:
        - lang: javascript
          label: Spree SDK
          source: >-
            import { createClient } from '@spree/sdk'


            const client = createClient({
              baseUrl: 'https://your-store.com',
              publishableKey: '<api-key>',
            })


            // The buyer's memberships, each carrying its node and the path
            above it.

            const { data: memberships } = await client.account.companies({
            token: '<token>' })
components:
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Publishable API key for store access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authenticated customers

````

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