# List Product Questions

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/products/{product_id}/questions:
    get:
      summary: List Product Questions
      deprecated: false
      description: |-
        Retrieve a list of all questions for a product.

        <Accordion title="🔑Scopes" defaultOpen>
            
          `products.read` - Products Read
         
        </Accordion>
      operationId: get-products-product_id-questions
      tags:
        - Default module/Apps/Merchant APIs/Products/Product Questions & Answers
        - Questions & Answers
      parameters:
        - name: product_id
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            The Authorization token is a unique key given to the third-party
            application (Partner) by Zid. It is used to authenticate the API
            requests made by the Partner application. The token verifies the
            partner's identity and ensures they have permission to access Zid's
            API but does not provide any specific user or store information. It
            should be included in the header of API requests when the partner
            application needs to access Zid's API.
          required: true
          example: >-
            Bearer
            eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMTciLCJqdGkiOiJhMTg5ZTg3MmYxMzhkMWVhYjU5MjVkMDkyMGE5NmI0YjliNjg0Y2E2ZTdmM2M2MjljZWYxNmQ4NDJjMmJlYmVhMjI4YTdmMTA0ZWQ4NWE5NCIsImlhdCI6MTY3OTU3Njk5OS41NjY4NzcsIm5iZiI6MTY3OTU3Njk5OS41NjY4OCwiZXhwIjoxNzExMTk5Mzk5LjQ4NjE1Mywic3ViIjoiMTgyNDc1Iiwic2NvcGVzIjpbInRoaXJkLXBhcnRpZXMtYXBpcyJdfQ.i07ef09nVNXGZF-g-QXpNoS2vlFQK_zntAqAMS4Az2XD2EyMLhxLZZRL-QlR11zUPqMmXjMAl_4ooKa3M3zkfZQ6Ga6qStvamk8RnC_39VUx0lfN2A4k65ERZpqwrMy6-t3dE99zay3aicIdNvbgi0zeuMSE5Tn99u-2AtSRa8ffbfAcYPPXacHrhdmlYzdiZS_x_skovFEow1E-nDjdL1WHqO92XdZ7RfNLkiYFTjZlZmM_UruvioaR3q6TXJbqRK_ZrziivezL8ohIQ2SBosUp58I29rlKzvlw_R2j0rKKYZbdxYDaxAHOISmOFKAlO66k7dNevAHI3s4uGIjoGA6ZXHknccWPLLLiaAQ0r64HV8GowW5dg2rhZNurJGDTnLlBQ6F-ql42ptHzSAfzzi576CEoN3gMVpgXcbntUY3reETkFsTBPUjeSuMpANMioXAA0GRp3Ut-84fTnrWxqsCW1WVUIx33HvmfCGPXIdkaCCWoA6G6KXo04MtFbKXQmXkK9esQWI-rqdVnMD3zSR3g3yFHZSL1U-mZeNja03706Rav1ordsRNOtRwtLuoRRbk9KasbUpEwqq4Ao9lqZZwRIjdEw-pQtnUT8V53fhmuuRIefCLFO7eGEtGUnh9o6Uh_pgi6AB6uSlnN9GEMGgI1alqvMmTjxvC-HHt0V-Y
          schema:
            type: string
        - name: Store-Id
          in: header
          description: ''
          required: true
          example: 0
          schema:
            type: number
            examples:
              - 37213
        - name: Role
          in: header
          description: Role of the user.
          required: true
          example: ''
          schema:
            type: string
            enum:
              - Manager
              - Customer
            examples:
              - Manager
        - name: Content-Type
          in: header
          description: >-
            The Media Type of the body of the request. This is used to describe
            the structure of the data in the body.
          required: true
          example: ''
          schema:
            type: string
            default: application/json
            enum:
              - application/json
              - multipart/form-data
              - application/x-www-form-urlencoded
        - name: Access-Token
          in: header
          description: >-
            An Access Token is a unique string that represents the authorization
            granted to a client (Partner application) by a user (Merchant or
            Store Manager) to access their protected resources. It is part of
            the OAuth 2.0 standard and is used to authenticate API requests on
            behalf of the user. Access Tokens have a limited lifespan and must
            be used within their validity period. Once expired, a new Access
            Token can be obtained using a Refresh Token. Access Tokens should be
            treated as sensitive information and must be kept secure to prevent
            unauthorized access to the user's data. If you do not have an
            `Access-Token`, but have the older alternative instead, i.e., the
            `X-Manager-Token`, then see the instructions
            [here](docs/Migrate-to-OAUTH-2.0.md) on how to obtain the
            `Access-Token`.
          required: true
          example: >-
            eyJpdiI6Imh3L2dGbmJmRnVCOUY4WW5WQ2s3RFE9PSIsInZhbHVlIjoiZklpRnJyVGV1OWcrZUJBNk44bVp5SjZzSS92V3czcTJjbnJ2dFYvenZ3SFBtWHNSMFU3ZEMzZ0ZJNnpucVE4Ui9rNFdicUduOGpKUlg1VXdGOFFIaVUzZjZyUUZybWx3R0tNY3orUmxoUUUxQ29wSkEyVDZTVnVYb2dlUXJSVzBYVkdESjBpS0xiN05Hbndzc2wzV2N0YitGM1NEdkk4ckZZOTZsTFdEL1ZQRlJJTE5FQmttZng2elpwL1RCeXFRdUd1U3JTc0FHV1kySS80RFJaWlIyZ3gwM2FsQVRFbkt3VWtFOUQyKzdGOD0iLCJtYWMiOiJmZDQ0YzM4ODE0OWQxOWRhYWU0NDhhYmIzYzQ1MDAxMDAzODZjZGM3ZGM4NGJhMGNkMDEyYWZlM2UzYjAxMTI4IiwidGFnIjoiIn0=
          schema:
            type: string
        - name: User-Agent
          in: header
          description: >-
            The User-Agent header contains information about the user agent
            (browser or app) making the request. It allows the server to provide
            a tailored response depending on the user agent's capabilities and
            preferences.
          required: false
          example: ''
          schema:
            type: string
            examples:
              - >-
                Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  name: Authed Manager
                  email: manager@zid.sa
                  question: What do you think of me?
                  store: aba1846c-c536-4c8a-9e1d-6b27ef1d240a
                  product: e5715f91a23a4eeabcead3f75b2d939c
                  is_anonymous: true
                  is_published: false
              properties:
                name:
                  type: string
                  description: The name of the customer asking the question.
                  examples:
                    - '"Authed Manager"'
                email:
                  type: string
                  description: The email address of the customer.
                  examples:
                    - '"manager@zid.sa"'
                question:
                  type: string
                  description: The content of the question.
                  examples:
                    - '"What do you think of me?"'
                store:
                  type: string
                  description: The unique identifier of the store.
                  examples:
                    - '"aba1846c-c536-4c8a-9e1d-6b27ef1d240a"'
                product:
                  type: string
                  description: The unique identifier of the product.
                  examples:
                    - '"e5715f91a23a4eeabcead3f75b2d939c"'
                is_anonymous:
                  type: boolean
                  description: Indicates if the question is asked anonymously.
                  default: true
                is_published:
                  type: boolean
                  description: Indicates if the question is published.
                  default: false
              x-apidog-orders:
                - name
                - email
                - question
                - store
                - product
                - is_anonymous
                - is_published
              x-apidog-ignore-properties: []
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Create-Get-Response'
          headers: {}
          x-apidog-name: All questions retrieved successfully.
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response returned when the request cannot be authenticated
                  because the required credentials are missing, invalid, or
                  expired.
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                    examples:
                      - error
                  message:
                    type: object
                    description: >-
                      Contains structured details explaining why the request
                      could not be authenticated.
                    properties:
                      type:
                        type: string
                        description: Indicates the category of the response message.
                        examples:
                          - error
                      code:
                        type: string
                        description: >-
                          A machine-readable code identifying the authentication
                          error. Returns null when no specific code is
                          available.
                        examples:
                          - UNAUTHORIZED
                        nullable: true
                      name:
                        type: string
                        description: >-
                          A short, human-readable title describing the
                          authentication error. Returns null when no title is
                          available.
                        examples:
                          - Unauthorized
                        nullable: true
                      description:
                        type: string
                        description: >-
                          A human-readable explanation of why the request could
                          not be authenticated. Returns null when no detailed
                          explanation is available.
                        examples:
                          - >-
                            Authentication credentials are missing, invalid, or
                            expired.
                        nullable: true
                    required:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                examples:
                  - status: error
                    message:
                      type: error
                      code: UNAUTHORIZED
                      name: Unauthorized
                      description: >-
                        Authentication credentials are missing, invalid, or
                        expired.
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Example 1
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_MISSING
                      name: Sorry
                      description: Please login first.
                '2':
                  summary: Example 2
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Login session expired. Please login again.
                '3':
                  summary: Example 3
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Invalid authentication
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the error.
                  message:
                    $ref: '#/components/schemas/ResponseEnvelopMessage'
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              example:
                status: error
                message:
                  type: error
                  code: MSG_HIDDEN
                  name: Error
                  description: Internal Server Error
          headers: {}
          x-apidog-name: Internal Server error
      security: []
      x-apidog-folder: Default module/Apps/Merchant APIs/Products/Product Questions & Answers
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-9148656-run
components:
  schemas:
    Create-Get-Response:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the created question.
          examples:
            - '"cf2fc926-d179-4330-8fff-330853416aea",'
        store:
          type: string
          description: The unique identifier of the store.
          examples:
            - '"3dfc16e6-ad19-4126-9c2a-5e4a7fb73051"'
        product:
          type: string
          description: The unique identifier of the product.
          examples:
            - '"678c40b4-3989-4623-b4c2-61d29066e6ab"'
        product_name:
          type: string
          description: The name of the product.
          examples:
            - '"i phone"'
        customer:
          type: 'null'
          description: Information about the customer (if available).
        name:
          type: string
          description: The name of the customer asking the question.
          examples:
            - '"anonymous customer"'
        email:
          type: string
          description: The email address of the customer.
          examples:
            - '"anon_customer@email.com"'
        is_anonymous:
          type: boolean
          description: Indicates if the question is asked anonymously.
          default: true
        is_owner:
          type: boolean
          description: Indicates if the question is created by the store owner.
          default: false
        is_published:
          type: boolean
          description: Indicates if the question is published.
          default: false
        is_sent:
          type: boolean
          description: Indicates if the question is sent for approval.
          default: false
        is_new:
          type: boolean
          description: Indicates if the question is new.
          default: true
        question:
          type: string
          examples:
            - '"What is ZID?"'
        created_at:
          type: string
          description: The timestamp of when the question was created.
          examples:
            - '"2024-07-12T06:28:34.765167Z"'
        answers:
          type: array
          description: A list of answers associated with the question.
          items:
            type: object
            x-apidog-orders: []
            properties: {}
            x-apidog-ignore-properties: []
      x-examples:
        Example 1:
          id: cf2fc926-d179-4330-8fff-330853416aea
          store: 3dfc16e6-ad19-4126-9c2a-5e4a7fb73051
          product: 678c40b4-3989-4623-b4c2-61d29066e6ab
          product_name: i phone
          customer: null
          name: anonymous customer
          email: anon_customer@email.com
          is_anonymous: true
          is_owner: false
          is_published: false
          is_sent: false
          is_new: true
          question: What about another question?
          created_at: '2024-07-12T06:28:34.765167Z'
          answers: []
      x-internal: true
      x-apidog-orders:
        - id
        - store
        - product
        - product_name
        - customer
        - name
        - email
        - is_anonymous
        - is_owner
        - is_published
        - is_sent
        - is_new
        - question
        - created_at
        - answers
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ResponseEnvelopMessage:
      type: object
      properties:
        type:
          type: string
          description: Type of response message returned by the API.
          examples:
            - success
        code:
          type: string
          description: Response code returned by the API, if available.
          examples:
            - MSG_POPUP_OK
          nullable: true
        name:
          type: string
          description: Name or title of the response message, if available.
          examples:
            - Coupons
          nullable: true
        description:
          type: string
          description: Detailed description of the response message, if available.
          examples:
            - Coupons created successfully
          nullable: true
      required:
        - type
        - code
        - name
        - description
      description: Additional response metadata.
      x-apidog-orders:
        - type
        - code
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
