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

# Set a store's precedence settings

> Replaces this store's precedence settings and returns the new version. Reordering sources changes which value resolves WITHOUT rewriting any source's own data — every record's resolved view is recomputed in the background, and `recompute.pending` reaching zero is how you know the window has closed. Every source and field you name must be one the store declares: precedence may reorder or restrict the declared set, never extend it. Requires an admin role.



## OpenAPI

````yaml /openapi.json put /data/stores/{store}/precedence
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /data/stores/{store}/precedence:
    put:
      tags:
        - data-stores
      summary: Set a store's precedence settings
      description: >-
        Replaces this store's precedence settings and returns the new version.
        Reordering sources changes which value resolves WITHOUT rewriting any
        source's own data — every record's resolved view is recomputed in the
        background, and `recompute.pending` reaching zero is how you know the
        window has closed. Every source and field you name must be one the store
        declares: precedence may reorder or restrict the declared set, never
        extend it. Requires an admin role.
      operationId: put_store_precedence_data_stores__store__precedence_put
      parameters:
        - name: store
          in: path
          required: true
          schema:
            type: string
            title: Store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrecedenceUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrecedenceResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '403':
          description: Admin role required
          content:
            application/json:
              example:
                detail: Admin role required
        '404':
          description: Not found — also returned on cross-tenant access (never 403)
          content:
            application/json:
              example:
                detail: Store not found
        '422':
          description: Validation error (see body for field details)
          content:
            application/json:
              example:
                detail: Validation error
        '429':
          description: Rate limit exceeded — retry after the Retry-After header
          content:
            application/json:
              example:
                detail: Rate limit exceeded
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    PrecedenceUpdate:
      properties:
        default_order:
          items:
            type: string
            maxLength: 64
          type: array
          maxItems: 64
          title: Default Order
          description: >-
            The order every field resolves by unless it is overridden. The first
            source in the order that asserts a value wins, and the order is also
            the list of sources allowed to write.
        field_overrides:
          additionalProperties:
            items:
              type: string
              maxLength: 64
            type: array
          propertyNames:
            maxLength: 64
          type: object
          maxProperties: 256
          title: Field Overrides
          description: >-
            Per-field orders that depart from the default, keyed by field name.
            A field absent here uses `default_order`.
      additionalProperties: false
      type: object
      required:
        - default_order
      title: PrecedenceUpdate
      description: >-
        New precedence settings for one store.


        The order you send replaces your settings wholesale: `default_order` is
        the

        order every field resolves by, and `field_overrides` names the fields
        that

        depart from it. Omitting `field_overrides` removes every override.


        Both may only reorder or restrict the sources the store declares — a
        name the

        store does not declare is refused, so a precedence change can never
        introduce

        a source or a field. Names are limited to letters, digits and
        underscores.
      example:
        default_order:
          - manual
          - csv_file
          - crm
          - five9_report
        field_overrides:
          owner_team:
            - manual
            - crm
    PrecedenceResponse:
      properties:
        store:
          type: string
          title: Store
          description: The store these settings belong to, by its URL slug.
        default_order:
          items:
            type: string
          type: array
          title: Default Order
          description: The order every field resolves by unless it is overridden.
        field_overrides:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Field Overrides
          description: >-
            Per-field orders that depart from the default. A field absent here
            uses `default_order`.
        config_version:
          type: integer
          title: Config Version
          description: >-
            Version of these settings. It increases on every change, including a
            change that reverts to the defaults. Every record records the
            version its resolved view was computed with, which is what makes a
            view left behind by a precedence change detectable — and what lets a
            resolved value be explained after the fact.
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: >-
            When these settings last changed. Null means they have never been
            changed and are the store's shipped defaults.
        recompute:
          $ref: '#/components/schemas/StoreRecomputeResponse'
      type: object
      required:
        - store
        - default_order
        - config_version
        - recompute
      title: PrecedenceResponse
      description: >-
        One store's precedence settings, with their version and recompute state.


        This is the standalone precedence resource. The store detail response
        carries

        the same order and overrides as a nested fragment; this one adds the
        version

        stamp, when it last moved, and how much of the store is still catching
        up.
      example:
        config_version: 2
        default_order:
          - manual
          - csv_file
          - crm
          - five9_report
        field_overrides:
          owner_team:
            - manual
            - crm
        recompute:
          pending: 4231
        store: company-phone-numbers
        updated_at: '2026-08-20T12:00:00Z'
    StoreRecomputeResponse:
      properties:
        pending:
          type: integer
          title: Pending
          description: >-
            How many records still carry a resolved view computed with an older
            precedence version. Zero means every record is current.
      type: object
      required:
        - pending
      title: StoreRecomputeResponse
      description: >-
        Whether every record's resolved view reflects the current precedence.


        Changing precedence invalidates the resolved views computed under the
        old

        settings, and they are recomputed in the background. While that is
        running,

        bulk queries legitimately mix records resolved under the old precedence
        with

        records resolved under the new one. `pending` reaching zero is how you
        know

        the window has closed.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````