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

# Update listing snapshot settings

> Updates daily snapshot count and optional snapshot/boost time windows for one or more listings.



## OpenAPI

````yaml /openapi.json patch /listings/snapshot-settings
openapi: 3.1.0
info:
  title: PricePirate Admin API
  version: 1.0.0
  description: >-
    Rate limits: each shop can send 60 requests per minute across all API keys.
    If the limit is exceeded, the API returns 429 TOO_MANY_REQUESTS with a
    Retry-After header.
servers:
  - url: https://app.pricepirate.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: catalog
    x-group: Catalog
  - name: listings
    x-group: Listings
  - name: metrics
    x-group: Metrics
  - name: price-changes
    x-group: Price changes
  - name: pricing
    x-group: Pricing
  - name: reports
    x-group: Reports
  - name: shop
    x-group: Shop
  - name: tracked-variants
    x-group: Tracked variants
paths:
  /listings/snapshot-settings:
    patch:
      tags:
        - listings
      summary: Update listing snapshot settings
      description: >-
        Updates daily snapshot count and optional snapshot/boost time windows
        for one or more listings.
      operationId: listings.updateSnapshotSettings
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Required for write requests. Reuse the same key only when retrying
            the exact same request.
          required: true
          schema:
            type: string
          example: 7f8c2e9d-8c7f-4f2c-9f35-6cc1819a7f3f
      requestBody:
        description: Snapshot settings to apply to the selected listing keys.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                listingKeys:
                  type: array
                  items:
                    type: object
                    properties:
                      source:
                        type: string
                        enum:
                          - IDEALO
                          - GOOGLE_SHOPPING
                          - KLARNA
                          - PRICERUNNER
                          - ALLEGRO
                          - AMAZON
                      country:
                        type: string
                        enum:
                          - AE
                          - AT
                          - AU
                          - BE
                          - BG
                          - BR
                          - CA
                          - CH
                          - CN
                          - CZ
                          - DE
                          - DK
                          - ES
                          - FI
                          - FR
                          - GR
                          - HR
                          - HU
                          - IE
                          - IN
                          - IT
                          - JP
                          - NL
                          - 'NO'
                          - PL
                          - PT
                          - RO
                          - MX
                          - SE
                          - SK
                          - UK
                          - US
                      externalId:
                        type: string
                    required:
                      - source
                      - country
                      - externalId
                    additionalProperties: false
                  minItems: 1
                numberOfDailySnapshots:
                  type: integer
                  minimum: 1
                  maximum: 16
                snapshotTimeRangeStart:
                  oneOf:
                    - type: string
                    - type: 'null'
                snapshotTimeRangeEnd:
                  oneOf:
                    - type: string
                    - type: 'null'
                boostTimeRangeEnabled:
                  oneOf:
                    - type: boolean
                    - type: 'null'
                boostTimeRangeStart:
                  oneOf:
                    - type: string
                    - type: 'null'
                boostTimeRangeEnd:
                  oneOf:
                    - type: string
                    - type: 'null'
                boostFactor:
                  oneOf:
                    - type: number
                      minimum: 2
                      maximum: 10
                    - type: 'null'
              required:
                - listingKeys
                - numberOfDailySnapshots
              additionalProperties: false
            example:
              listingKeys:
                - source: IDEALO
                  country: DE
                  externalId: '123456789'
              numberOfDailySnapshots: 4
              snapshotTimeRangeStart: '2025-01-01T08:00:00Z'
              snapshotTimeRangeEnd: '2025-01-01T20:00:00Z'
              boostTimeRangeEnabled: true
              boostTimeRangeStart: '2025-01-01T12:00:00Z'
              boostTimeRangeEnd: '2025-01-01T15:00:00Z'
              boostFactor: 3
      responses:
        '200':
          description: Successful response.
          headers:
            Idempotency-Replayed:
              description: >-
                Present with value true when a write response was served from
                the idempotency cache.
              schema:
                type: string
                enum:
                  - 'true'
              example: 'true'
          content:
            application/json:
              schema: {}
              example:
                listing:
                  source: IDEALO
                  country: DE
                  externalId: '123456789'
                  numberOfDailySnapshots: 4
                listings: []
                updatedCount: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/DefaultError'
components:
  responses:
    BadRequest:
      description: Bad request or validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: BAD_REQUEST
              message: JSON body must be an object
              details: Validation details may be included for invalid inputs.
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid Authorization header
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    Forbidden:
      description: The token is valid but the request is not allowed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: FORBIDDEN
              message: Forbidden
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    NotFound:
      description: Endpoint or domain resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Resource not found
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    Conflict:
      description: Write conflict, including idempotency key reuse or in-progress locks.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: idempotency_key_reuse
              message: Idempotency-Key was already used for a different request
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    TooManyRequests:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: string
          example: '60'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: TOO_MANY_REQUESTS
              message: Rate limit exceeded
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_SERVER_ERROR
              message: Internal server error
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
    DefaultError:
      description: Unexpected error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_SERVER_ERROR
              message: Internal server error
              requestId: 1b11c2c2-7c6f-44d9-9980-02a77681b91f
  schemas:
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              description: >-
                Runtime error code. Examples include BAD_REQUEST, UNAUTHORIZED,
                FORBIDDEN, NOT_FOUND, CONFLICT, TOO_MANY_REQUESTS,
                INTERNAL_SERVER_ERROR, idempotency_key_required,
                idempotency_key_reuse, and idempotency_key_in_progress.
            message:
              type: string
            details:
              description: >-
                Additional validation details, typically present on 400
                responses.
            requestId:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Public API token passed as Authorization: Bearer <token>.'

````