openapi: 3.0.3
info:
  title: YaketyYak
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://app.yakety-yak.io'
paths:
  /api/v1/reviews:
    get:
      summary: ''
      operationId: getApiV1Reviews
      description: ''
      parameters:
        -
          in: query
          name: reviewable
          description: 'A valid Reviewable entity. Must be a valid UUID.'
          example: c5bdadc4-a222-304a-a528-630427d6c49a
          required: true
          schema:
            type: string
            description: 'A valid Reviewable entity. Must be a valid UUID.'
            example: c5bdadc4-a222-304a-a528-630427d6c49a
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 10ad29d5-aadb-4e6f-bb57-35473071f509
                      body: "Great Product, I've been able to unleash the power of the Pyramid!"
                      rating: '5.0'
                      reviewer:
                        name: 'Dwight S.'
                    -
                      id: 20ad29d5-aadb-4e6f-bb57-35473071f500
                      body: 'It blew up in my face!'
                      rating: '2.0'
                      reviewer:
                        name: 'Andy B.'
                  snapshot:
                    total_rating_average: '3.5'
                    total_rating_count:
                      rating_0_count: 0
                      rating_1_count: 0
                      rating_2_count: 1
                      rating_3_count: 0
                      rating_4_count: 0
                      rating_5_count: 1
                  pagination:
                    currentPage: 1
                    from: 1
                    lastPage: 1
                    perPage: 50
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 10ad29d5-aadb-4e6f-bb57-35473071f509
                        body: "Great Product, I've been able to unleash the power of the Pyramid!"
                        rating: '5.0'
                        reviewer:
                          name: 'Dwight S.'
                      -
                        id: 20ad29d5-aadb-4e6f-bb57-35473071f500
                        body: 'It blew up in my face!'
                        rating: '2.0'
                        reviewer:
                          name: 'Andy B.'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 10ad29d5-aadb-4e6f-bb57-35473071f509
                          description: 'The UUID of the review'
                        body:
                          type: string
                          example: "Great Product, I've been able to unleash the power of the Pyramid!"
                          description: 'The body of the review'
                        rating:
                          type: string
                          example: '5.0'
                          description: 'A float value of rating for the review'
                        reviewer:
                          type: object
                          properties:
                            name:
                              type: string
                              example: 'Dwight S.'
                              description: ' The semi-anonymous name of the reviewer'
                  snapshot:
                    type: object
                    properties:
                      total_rating_average:
                        type: string
                        example: '3.5'
                        description: 'A float value of the mean average rating of the reviewable'
                      total_rating_count:
                        type: object
                        properties:
                          rating_0_count:
                            type: integer
                            example: 0
                          rating_1_count:
                            type: integer
                            example: 0
                          rating_2_count:
                            type: integer
                            example: 1
                          rating_3_count:
                            type: integer
                            example: 0
                          rating_4_count:
                            type: integer
                            example: 0
                          rating_5_count:
                            type: integer
                            example: 1
                  pagination:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 1
                        description: 'The current page of the paginated result'
                      from:
                        type: integer
                        example: 1
                        description: 'First item index of the paginated result'
                      lastPage:
                        type: integer
                        example: 1
                        description: 'Last page of the paginated result'
                      perPage:
                        type: integer
                        example: 50
                        description: 'How many items per page'
                      to:
                        type: integer
                        example: 2
                        description: 'Last item index of the paginated result'
                      total:
                        type: integer
                        example: 2
                        description: 'The total number of items regardless of pagination'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
  /api/v1/reviewables:
    get:
      summary: ''
      operationId: getApiV1Reviewables
      description: ''
      parameters: []
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 6b0d9530-46fd-4e5e-846d-4fe5853755a9
                      name: 'Sabre Printer'
                      thumbnail_url: 'https://placehold.co/600x600/B2DBD5/FA8D65/jpg'
                      source: Shopify
                      custom_id: 'gid://shopify/Product/9125877418212'
                    -
                      id: 5b0d9530-46fd-4e5e-846d-4fe5853755a8
                      name: 'Sabre Pyramid'
                      thumbnail_url: 'https://placehold.co/600x600/B2DBD5/FA8D65/jpg'
                      source: Etsy
                      custom_id: 6b0491c4-d4d3-4a48-a196-893b00dabdc5
                  pagination:
                    currentPage: 1
                    from: 1
                    lastPage: 1
                    perPage: 50
                    to: 1
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 6b0d9530-46fd-4e5e-846d-4fe5853755a9
                        name: 'Sabre Printer'
                        thumbnail_url: 'https://placehold.co/600x600/B2DBD5/FA8D65/jpg'
                        source: Shopify
                        custom_id: 'gid://shopify/Product/9125877418212'
                      -
                        id: 5b0d9530-46fd-4e5e-846d-4fe5853755a8
                        name: 'Sabre Pyramid'
                        thumbnail_url: 'https://placehold.co/600x600/B2DBD5/FA8D65/jpg'
                        source: Etsy
                        custom_id: 6b0491c4-d4d3-4a48-a196-893b00dabdc5
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 6b0d9530-46fd-4e5e-846d-4fe5853755a9
                          description: 'The UUID of the reviewable'
                        name:
                          type: string
                          example: 'Sabre Printer'
                          description: 'The name of the reviewable'
                        thumbnail_url:
                          type: string
                          example: 'https://placehold.co/600x600/B2DBD5/FA8D65/jpg'
                          description: 'The current page of the paginated result'
                        source:
                          type: string
                          example: Shopify
                        custom_id:
                          type: string
                          example: 'gid://shopify/Product/9125877418212'
                          description: 'The id of the reviewable from the source, eg Shopify'
                  pagination:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 1
                        description: 'The current page of the paginated result'
                      from:
                        type: integer
                        example: 1
                        description: 'First item index of the paginated result'
                      lastPage:
                        type: integer
                        example: 1
                        description: 'Last page of the paginated result'
                      perPage:
                        type: integer
                        example: 50
                        description: 'How many items per page'
                      to:
                        type: integer
                        example: 1
                        description: 'Last item index of the paginated result'
                      total:
                        type: integer
                        example: 2
                        description: 'The total number of items regardless of pagination'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
  /api/v1/healthcheck:
    get:
      summary: ''
      operationId: getApiV1Healthcheck
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
tags:
  -
    name: Endpoints
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: "We have implemented a 'soft' level of authentication for the API.\nThis means you'll generate an API key in our dashboard which you may\nuse in a public environment, and this will only retrieve non-sensitive information.\n\nGenerate your API key here: https://app.yakety-yak.io/integrations/api\n"
security:
  -
    default: []
