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

# Add Rating

> A `POST` to the `/ratings` endpoint allows your application to create a Rating.



## OpenAPI

````yaml post /v3/ratings
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/ratings:
    post:
      tags:
        - Rating
      summary: Add Rating
      description: >-
        A `POST` to the `/ratings` endpoint allows your application to create a
        Rating.
      operationId: ratings.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreRating'
      responses:
        '200':
          description: '`Rating`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Rating'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreRating:
      type: object
      properties:
        profile_id:
          type: string
        source:
          type: string
          enum:
            - product
            - product_variant
            - transaction
            - staff
            - interaction
            - external
        product_id:
          type: integer
        staff_id:
          type: string
        product_variant_id:
          type: integer
        transaction_id:
          type: integer
        interaction_id:
          type: integer
        external_id:
          type: string
        status:
          type: string
          enum:
            - offered
            - declined
            - received
        score_type:
          type: string
          enum:
            - csat1
            - csat2
            - csat3
            - csat4
            - csat5
            - csat6
            - csat7
            - csat8
            - csat9
            - csat10
            - nps
        score:
          type: integer
        namespace:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        comment:
          type:
            - string
            - 'null'
        reason:
          type:
            - string
            - 'null'
        requires_action:
          type: boolean
        meta:
          type:
            - array
            - 'null'
          items:
            type: string
        is_public:
          type:
            - boolean
            - 'null'
        is_active:
          type:
            - boolean
            - 'null'
      required:
        - profile_id
        - source
        - status
        - score_type
        - score
        - requires_action
      title: StoreRating
    Rating:
      type: object
      properties:
        id:
          type: integer
        profile_id:
          type: string
        source:
          type: string
        product_id:
          type:
            - integer
            - 'null'
        product_variant_id:
          type:
            - integer
            - 'null'
        transaction_id:
          type:
            - integer
            - 'null'
        interaction_id:
          type:
            - integer
            - 'null'
        staff_id:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        status:
          type: string
        score_type:
          type: string
        score:
          type: integer
        namespace:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        comment:
          type:
            - string
            - 'null'
        reason:
          type:
            - string
            - 'null'
        is_public:
          type: boolean
        is_active:
          type:
            - boolean
            - 'null'
        requires_action:
          type: boolean
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - profile_id
        - source
        - product_id
        - product_variant_id
        - transaction_id
        - interaction_id
        - staff_id
        - external_id
        - status
        - score_type
        - score
        - namespace
        - title
        - comment
        - reason
        - is_public
        - is_active
        - requires_action
        - meta
        - created_at
        - updated_at
      title: Rating
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````