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

# List price overrides (prix magasin) by store or by product

> Lists store-scoped price overrides (prix magasin / prix spécifique) along ONE axis: pass `?store=<id>` for every override authored in a store (the back-office authoring grid), or `?product=<id>` for every store's override of one sellable unit (the product price map — so a manager sees a produit's price across the fleet in one call instead of fanning out per store). Provide EXACTLY ONE — a request with neither, or with both, 400s. Each override REPLACES the base catalogue price for its (store, sku) while active. For the resulting sellable price a till uses, read `GET /products/:id/units?store=<id>` instead.



## OpenAPI

````yaml /openapi.json get /v1/store-prices
openapi: 3.0.3
info:
  title: Solya POS API
  version: 1.0.0
  description: >-
    The Solya POS backend HTTP surface. Every documented operation is
    agent-ready: it carries an `operationId`, an agent-facing `description`, the
    `pos.*` scopes it enforces (`x-required-permissions`) and an `x-agent-tier`.
    Success responses return the payload as raw JSON; failures return the
    `ErrorResponse` envelope (`{ error: { code, message, statusCode } }`).
servers:
  - url: /
    description: The backend, relative to its deployed origin.
security: []
paths:
  /v1/store-prices:
    get:
      tags:
        - Catalog
      summary: List price overrides (prix magasin) by store or by product
      description: >-
        Lists store-scoped price overrides (prix magasin / prix spécifique)
        along ONE axis: pass `?store=<id>` for every override authored in a
        store (the back-office authoring grid), or `?product=<id>` for every
        store's override of one sellable unit (the product price map — so a
        manager sees a produit's price across the fleet in one call instead of
        fanning out per store). Provide EXACTLY ONE — a request with neither, or
        with both, 400s. Each override REPLACES the base catalogue price for its
        (store, sku) while active. For the resulting sellable price a till uses,
        read `GET /products/:id/units?store=<id>` instead.
      operationId: listStorePrices
      parameters:
        - schema:
            type: string
            minLength: 1
          in: query
          name: store
          required: false
          description: >-
            Store-axis: list every override authored for THIS store (the store's
            authoring grid).
        - schema:
            type: string
            minLength: 1
          in: query
          name: product
          required: false
          description: >-
            Product-axis: list every store's override for THIS sellable-unit id
            (the product price map).
      responses:
        '200':
          description: >-
            The matched override records (store-axis, or product-axis across
            stores).
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            Composite `store:sku` override id (derived, never
                            client-supplied).
                        kind:
                          type: string
                          enum:
                            - override
                          description: Discriminator — always `override` for this table.
                        storeId:
                          type: string
                          description: Store the override applies in.
                        productId:
                          type: string
                          description: >-
                            Sellable-unit id the override is keyed on (the SKU
                            digest).
                        priceCents:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                          description: >-
                            The override gross unit price in integer cents
                            (replaces the base while active).
                        priority:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: >-
                            Tie-break when several windows overlap — the HIGHER
                            priority wins.
                        validFrom:
                          description: >-
                            ISO-8601 start of the validity window (inclusive);
                            open-started when absent.
                          type: string
                        validTo:
                          description: >-
                            ISO-8601 end of the validity window (exclusive);
                            open-ended when absent.
                          type: string
                        version:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: >-
                            Optimistic-concurrency counter, bumped on every
                            save.
                      required:
                        - id
                        - kind
                        - storeId
                        - productId
                        - priceCents
                        - priority
                        - version
                      additionalProperties: false
                    description: The matched override records.
                required:
                  - items
                additionalProperties: false
                description: >-
                  The matched override records (store-axis, or product-axis
                  across stores).
                example:
                  items:
                    - id: store-1:sku-espresso-1kg
                      kind: override
                      storeId: store-1
                      productId: sku-espresso-1kg
                      priceCents: 1500
                      priority: 0
                      version: 1
                    - id: store-2:sku-espresso-1kg
                      kind: override
                      storeId: store-2
                      productId: sku-espresso-1kg
                      priceCents: 1400
                      priority: 0
                      version: 1
        '400':
          description: >-
            The request failed schema validation; `error.fieldErrors` lists the
            fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: No valid credential was presented — send a bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The actor is authenticated but lacks the required `pos.*` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected server error — safe to retry idempotent requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ValidationErrorResponse:
      type: object
      required:
        - error
      additionalProperties: false
      description: >-
        A `VALIDATION_FAILED` envelope carrying the offending fields in
        `fieldErrors`.
      properties:
        error:
          type: object
          required:
            - code
            - message
            - statusCode
          additionalProperties: false
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
            message:
              type: string
            statusCode:
              type: integer
            fieldErrors:
              type: array
              description: >-
                One entry per rejected field: the field path and why it was
                rejected.
              items:
                type: object
                required:
                  - field
                  - message
                additionalProperties: false
                properties:
                  field:
                    type: string
                    description: Dot-path of the offending field.
                  message:
                    type: string
                    description: Why the field was rejected.
    ErrorResponse:
      type: object
      required:
        - error
      additionalProperties: false
      description: The uniform failure envelope every non-2xx response returns.
      properties:
        error:
          type: object
          required:
            - code
            - message
            - statusCode
          additionalProperties: false
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - BUSINESS_RULE_VIOLATION
                - INTERNAL_ERROR
              description: >-
                Machine-readable kernel `ResultCode` — branch on this, not on
                `message`.
            message:
              type: string
              description: >-
                Human-readable explanation. Safe to surface; never leaks server
                internals.
            statusCode:
              type: integer
              description: >-
                The HTTP status, mirrored into the body so a client need not
                read headers.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        `Authorization: Bearer <token>`. Accepts EITHER a Keycloak access token
        (scopes-in-token) OR an opaque POS session token; both resolve to the
        same `pos.*` scope vocabulary the route guards enforce.

````