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

# Bulk upsert competitor prices

> Create or update many competitor price observations in Retailgrid in a single request, ideal for syncing large feeds from scraping providers.



## OpenAPI

````yaml POST /v1/competitor_prices/bulk
openapi: 3.1.0
info:
  title: Retailgrid Public API
  version: v1
servers: []
security: []
paths:
  /v1/competitor_prices/bulk:
    post:
      tags:
        - competitor_prices
      summary: Bulk Upsert Competitor Prices
      operationId: bulk_upsert_competitor_prices_v1_competitor_prices_bulk_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompetitorPriceBulkRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CompetitorPriceBulkRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CompetitorPriceBulkItem'
          type: array
          title: Items
      additionalProperties: false
      type: object
      title: CompetitorPriceBulkRequest
    BulkResponse:
      properties:
        results:
          items:
            oneOf:
              - $ref: '#/components/schemas/BulkItemSuccess'
              - $ref: '#/components/schemas/BulkItemError'
            discriminator:
              propertyName: ok
              mapping:
                'False':
                  $ref: '#/components/schemas/BulkItemError'
                'True':
                  $ref: '#/components/schemas/BulkItemSuccess'
          type: array
          title: Results
      additionalProperties: false
      type: object
      title: BulkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CompetitorPriceBulkItem:
      properties:
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
        promo_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Promo Price
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
        competitor_sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Competitor Sku
        barcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Barcode
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        stock_on_hand:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Stock On Hand
        competitor_name:
          type: string
          title: Competitor Name
        observed_at:
          type: string
          format: date-time
          title: Observed At
        regular_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Regular Price
      additionalProperties: false
      type: object
      required:
        - competitor_name
        - observed_at
        - regular_price
      title: CompetitorPriceBulkItem
    BulkItemSuccess:
      properties:
        index:
          type: integer
          title: Index
        ok:
          type: boolean
          const: true
          title: Ok
        id:
          anyOf:
            - type: string
              format: uuid
            - type: integer
          title: Id
      additionalProperties: false
      type: object
      required:
        - index
        - ok
        - id
      title: BulkItemSuccess
    BulkItemError:
      properties:
        index:
          type: integer
          title: Index
        ok:
          type: boolean
          const: false
          title: Ok
        code:
          type: string
          enum:
            - validation_error
            - conflict
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: false
      type: object
      required:
        - index
        - ok
        - code
        - message
      title: BulkItemError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````