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

# Create feedback

> Creates a new customer feedback entry for a specific receipt and member.

This endpoint resolves chain and store information by unique identifier or name:
- If ChainId is missing but ChainName is provided, it looks up the ChainId
- If ChainName is missing but ChainId is provided, it looks up the ChainName
- Same logic applies for StoreId and StoreName



## OpenAPI

````yaml openapi/customerfeedback-v1.json POST /v1/Feedback
openapi: 3.0.4
info:
  title: CustomerFeedback.Api
  version: v1
servers:
  - url: https://{host}/customerfeedback
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/Feedback:
    post:
      tags:
        - Feedback
      summary: Create feedback
      description: >-
        Creates a new customer feedback entry for a specific receipt and member.


        This endpoint resolves chain and store information by unique identifier
        or name:

        - If ChainId is missing but ChainName is provided, it looks up the
        ChainId

        - If ChainName is missing but ChainId is provided, it looks up the
        ChainName

        - Same logic applies for StoreId and StoreName
      parameters:
        - name: memberId
          in: query
          description: Unique identifier of the member
          required: true
          schema:
            type: string
      requestBody:
        description: The request body for creating a feedback
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/CustomerFeedback.Api.DTO.Requests.CreateFeedbackRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/CustomerFeedback.Api.DTO.Requests.CreateFeedbackRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/CustomerFeedback.Api.DTO.Requests.CreateFeedbackRequest
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/CustomerFeedback.Api.DTO.Responses.CreateFeedbackResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomerFeedback.Api.DTO.Responses.CreateFeedbackResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomerFeedback.Api.DTO.Responses.CreateFeedbackResponse
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
components:
  schemas:
    CustomerFeedback.Api.DTO.Requests.CreateFeedbackRequest:
      required:
        - rating
        - receiptId
      type: object
      properties:
        receiptId:
          maxLength: 50
          minLength: 0
          type: string
          description: The unique identifier of the receipt
        chainId:
          maxLength: 50
          minLength: 0
          type: string
          description: The chain unique identifier where the purchase was made
          nullable: true
        chainName:
          maxLength: 50
          minLength: 0
          type: string
          description: The chain name where the purchase was made
          nullable: true
        storeId:
          maxLength: 100
          minLength: 0
          type: string
          description: The store unique identifier where the purchase was made
          nullable: true
        storeName:
          maxLength: 100
          minLength: 0
          type: string
          description: The store name where the purchase was made
          nullable: true
        rating:
          maximum: 10
          minimum: 1
          type: integer
          description: The received rating
          format: int32
        options:
          maxLength: 50
          minLength: 0
          type: array
          items:
            type: string
          description: The selected options when completing the feedback
          nullable: true
        message:
          maxLength: 500
          minLength: 0
          type: string
          description: The custom message left by the user
          nullable: true
        state:
          $ref: >-
            #/components/schemas/CustomerFeedback.ApplicationService.CQRS.Models.FeedbackState
      additionalProperties: false
    CustomerFeedback.Api.DTO.Responses.CreateFeedbackResponse:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the feedback
          format: int64
        thankYouMessage:
          type: string
          description: >-
            Thank you messsage generated based on the configured options to
            display to the user
          nullable: true
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    CustomerFeedback.ApplicationService.CQRS.Models.FeedbackState:
      enum:
        - None
        - Open
        - Closed
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Opaque Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````