> ## 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.

# Create a competitor price

> Record a single competitor price observation in Retailgrid, capturing the competitor, product match, price, currency, and observation date.



## OpenAPI

````yaml POST /v1/competitor_prices
openapi: 3.1.0
info:
  title: Retailgrid Public API
  version: v1
servers: []
security: []
paths:
  /v1/competitor_prices:
    post:
      tags:
        - competitor_prices
      summary: Create Competitor Price
      operationId: create_competitor_price_v1_competitor_prices_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompetitorPriceCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompetitorPriceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CompetitorPriceCreate:
      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: CompetitorPriceCreate
    CompetitorPriceResponse:
      properties:
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
        promo_price:
          anyOf:
            - 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: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Stock On Hand
        id:
          type: integer
          title: Id
        competitor_name:
          type: string
          title: Competitor Name
        observed_at:
          type: string
          format: date-time
          title: Observed At
        regular_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Regular Price
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      additionalProperties: false
      type: object
      required:
        - id
        - competitor_name
        - observed_at
        - regular_price
      title: CompetitorPriceResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````