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

# Get customer groups with paginated prices for a user or organisation

> Returns customer groups accessible to the given user (direct + organisations + ancestor organisations) OR to the given organisation (direct + ancestor organisations), for the given store group. Exactly one of `user_id` or `organisation_id` must be provided. Product variant customer group prices for the given market are paginated and nested under their customer group.



## OpenAPI

````yaml /swagger/auth-api.json get /api/v1/{app_id}/customer-groups/store-groups/{store_group_id}/markets/{market_id}/prices
openapi: 3.0.0
info:
  contact:
    email: support@enad.io
    name: API support
    url: http://enad.io/support
  description: This is the documentation for Auth API v1
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://enad.io/terms/
  title: Public API
  version: '1.0'
servers:
  - url: //customers.enad.io
security: []
paths:
  /api/v1/{app_id}/customer-groups/store-groups/{store_group_id}/markets/{market_id}/prices:
    get:
      tags:
        - Customer Groups
      summary: Get customer groups with paginated prices for a user or organisation
      description: >-
        Returns customer groups accessible to the given user (direct +
        organisations + ancestor organisations) OR to the given organisation
        (direct + ancestor organisations), for the given store group. Exactly
        one of `user_id` or `organisation_id` must be provided. Product variant
        customer group prices for the given market are paginated and nested
        under their customer group.
      parameters:
        - description: uuid of the app
          in: path
          name: app_id
          required: true
          schema:
            type: string
        - description: uuid of the store group
          in: path
          name: store_group_id
          required: true
          schema:
            type: string
        - description: uuid of the market
          in: path
          name: market_id
          required: true
          schema:
            type: string
        - description: uuid of the user (mutually exclusive with organisation_id)
          in: query
          name: user_id
          schema:
            type: string
        - description: uuid of the organisation (mutually exclusive with user_id)
          in: query
          name: organisation_id
          schema:
            type: string
        - description: Page number
          in: query
          name: page
          schema:
            type: integer
            default: 1
        - description: Number of prices per page
          in: query
          name: per_page
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: Customer groups with nested paginated prices
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupPricesResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupPricesResponse:
      properties:
        customer_groups:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupPrices
          type: array
        page:
          type: integer
        page_size:
          type: integer
        total_items:
          type: integer
        total_pages:
          type: integer
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage:
      properties:
        details:
          items:
            type: string
          type: array
        message:
          type: string
        success:
          type: boolean
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupPrices:
      properties:
        app_id:
          type: string
        created_at:
          type: string
        discount_percentage:
          type: integer
        discount_percentage_decimals:
          type: integer
        id:
          type: string
        name:
          type: string
        prices:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupProductPrice
          type: array
        slug:
          type: string
        store_group_id:
          type: string
        updated_at:
          type: string
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_models.CustomerGroupProductPrice:
      properties:
        created_at:
          type: string
        id:
          type: string
        price_amount:
          type: number
        product_number:
          type: string
        product_variant_id:
          type: string
        updated_at:
          type: string
        variant_number:
          type: string
      type: object

````